{"id":50055987,"url":"https://github.com/code-yeongyu/pi-anthropic-code-execution","last_synced_at":"2026-05-21T13:14:29.802Z","repository":{"id":357279552,"uuid":"1236229383","full_name":"code-yeongyu/pi-anthropic-code-execution","owner":"code-yeongyu","description":"Anthropic native code execution policy extension for the pi coding agent. Ensures native code_execution tools are present on anthropic-messages payloads when opt-in is enabled and appends code execution guidance to the system prompt.","archived":false,"fork":false,"pushed_at":"2026-05-12T04:14:41.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-12T06:23:58.884Z","etag":null,"topics":["anthropic","claude","code-execution","coding-agent","pi","pi-coding-agent","pi-extension","pi-mono","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/code-yeongyu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-05-12T04:08:27.000Z","updated_at":"2026-05-12T04:14:44.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/code-yeongyu/pi-anthropic-code-execution","commit_stats":null,"previous_names":["code-yeongyu/pi-anthropic-code-execution"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/code-yeongyu/pi-anthropic-code-execution","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-yeongyu%2Fpi-anthropic-code-execution","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-yeongyu%2Fpi-anthropic-code-execution/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-yeongyu%2Fpi-anthropic-code-execution/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-yeongyu%2Fpi-anthropic-code-execution/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/code-yeongyu","download_url":"https://codeload.github.com/code-yeongyu/pi-anthropic-code-execution/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-yeongyu%2Fpi-anthropic-code-execution/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33301833,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-21T12:23:38.849Z","status":"ssl_error","status_checked_at":"2026-05-21T12:22:11.673Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anthropic","claude","code-execution","coding-agent","pi","pi-coding-agent","pi-extension","pi-mono","typescript"],"created_at":"2026-05-21T13:14:26.700Z","updated_at":"2026-05-21T13:14:29.795Z","avatar_url":"https://github.com/code-yeongyu.png","language":"TypeScript","funding_links":[],"categories":["Extensions"],"sub_categories":[],"readme":"# pi-anthropic-code-execution\n\n[![ci](https://github.com/code-yeongyu/pi-anthropic-code-execution/actions/workflows/ci.yml/badge.svg)](https://github.com/code-yeongyu/pi-anthropic-code-execution/actions/workflows/ci.yml) [![license: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\nAnthropic native code execution extension for the [pi coding agent](https://github.com/badlogic/pi-mono/tree/main/packages/coding-agent).\n\nThis package is the standalone extraction of senpi's former builtin `anthropic-code-execution` extension.\n\n## Behavior\n\nThe extension does not register a new tool. It intercepts Anthropic requests before they are sent and ensures a native `code_execution_*` tool is present for `anthropic-messages` payloads only when code execution is explicitly enabled.\n\n| Case | Result |\n|------|--------|\n| `PI_ANTHROPIC_CODE_EXECUTION` is enabled, API is `anthropic-messages`, and no native `code_execution_*` tool exists | injects `{ type: \"code_execution_20250825\", name: \"code_execution\" }` |\n| `PI_ANTHROPIC_CODE_EXECUTION` is enabled and a native `code_execution_*` tool already exists | preserves existing native tool (no duplication) |\n| `PI_ANTHROPIC_CODE_EXECUTION` is enabled and a function variant named `code_execution` is present | strips function variant and keeps/uses native variant |\n| `PI_ANTHROPIC_CODE_EXECUTION` is disabled or unset | no-op |\n| API is non-Anthropic | no-op |\n\nTruthy values for `PI_ANTHROPIC_CODE_EXECUTION` are: `1`, `true`, `yes`, `on` (case-insensitive, surrounding whitespace allowed).\n\nIt also appends a system-prompt section for Anthropic sessions indicating native `code_execution` availability when enabled.\n\n## Installation\n\nThe package targets the [`pi`](https://github.com/badlogic/pi-mono/tree/main/packages/coding-agent) coding agent. Pi loads extensions from `~/.pi/agent/extensions/`, project `.pi/extensions/`, or via the `--extension` / `-e` CLI flag.\n\n```bash\n# From npm (once published)\npi install npm:pi-anthropic-code-execution\n\n# From git\npi install git:github.com/code-yeongyu/pi-anthropic-code-execution\n\n# Manual placement\ngit clone https://github.com/code-yeongyu/pi-anthropic-code-execution ~/.pi/agent/extensions/pi-anthropic-code-execution\ncd ~/.pi/agent/extensions/pi-anthropic-code-execution \u0026\u0026 npm install\n\n# Dev / one-shot test\npi -e /path/to/pi-anthropic-code-execution/src/index.ts\n```\n\nAfter installation, restart pi or run `/reload` inside an interactive session.\n\n## Development\n\n```bash\nnpm install\nnpm test\nnpm run typecheck\nnpm run check\npi -e ./src/index.ts\n```\n\nThe test suite uses vitest. TypeScript is strict, Node-only, and uses ESM imports with `.js` suffixes.\n\n## Origin\n\nPorted from `packages/coding-agent/src/core/extensions/builtin/anthropic-code-execution/index.ts` in `code-yeongyu/senpi-mono`.\n\n## License\n\n[MIT](LICENSE).\n\n## Related\n\n- [senpi](https://github.com/code-yeongyu/senpi) — the fork/runtime these extensions are extracted from.\n- [Ultraworkers Discord](https://discord.gg/PUwSMR9XNk) — community link from the senpi README.\n- [Dori](https://sisyphuslabs.ai) — the product powered by senpi under the hood.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-yeongyu%2Fpi-anthropic-code-execution","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode-yeongyu%2Fpi-anthropic-code-execution","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-yeongyu%2Fpi-anthropic-code-execution/lists"}