pi bridge: activate the full built-in tool set (grep/find/ls)

pi ships seven built-in tools but activates only read/write/edit/bash by
default. The --tools flag can't fix this (it is a strict allowlist that drops
extension tools — verified against a live endpoint), so the bridge calls
setActiveTools with everything registered at session start: all seven built-ins
plus ask_operator and the four memory tools. Verified live: the model now
receives all twelve tool definitions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KdGv3u3DfTsP1S188KDhVH
This commit is contained in:
Claude
2026-08-12 18:27:17 +00:00
parent a3a5c272a2
commit 887576bf22
3 changed files with 14 additions and 1 deletions
+3 -1
View File
@@ -134,7 +134,9 @@ completion gate never sees generated files:
`PI_CONTEXT_WINDOW`, and `PI_MAX_TOKENS` tune it; everything else in the env map
passes through to the process.
- **`extensions/handler-bridge.ts`** — the bundled bridge extension that adapts pi's
events to the same `python -m handler.hooks` contract claude uses. The gates are the
events to the same `python -m handler.hooks` contract claude uses. It also activates
pi's full built-in tool set — `read`, `write`, `edit`, `bash`, plus `grep`, `find`,
and `ls`, which pi leaves off by default — alongside the handler tools it registers. The gates are the
*same tested Python code*: the Stop/completion gate re-prompts pi with the blockers,
`git push` runs the test + image-build + protected-branch approval gates and denies on
failure, and questions go through an `ask_operator` tool that pauses the agent for the