--- status: accepted date: 2026-06-25 --- # Run the agent through Pi RPC with a gate extension The model runs inside Pi in `--mode rpc`, one child process per session. Human review is enforced by a gate extension inside Pi (`harness/.pi/extensions/tht-gate.js`) that emits widget descriptors through Pi's extension UI requests; the backend only translates those requests and the reviewer's responses between Pi and the browser and implements no gate logic of its own. The gate, anti-bypass and kickoff logic came from ChironeWp3 and already relied on Pi's extension and RPC contract; reimplementing them in the backend would have meant rewriting the most delicate part of the workflow from scratch. ## Consequences Every reviewer interaction is a JSON widget descriptor, so the browser, not a terminal, is the primary reviewer surface (see ADR-0009 for native terminal rendering). Pi upgrades are a direct dependency of the review contract.