Expand description
WorktreeExecutor — the coder’s host-side tool executor.
Wraps car_engine::agent_basics file tools plus a new host shell tool,
with three hard guarantees enforced in code (not just policy):
- Pinned cwd — shell commands always run at the worktree root; there is no cwd parameter. Relative file-tool paths are rooted there too, and clamped against lexical escape.
- Bounded output — combined output is capped (tail-kept) so a noisy build can’t flood the conversation or the event stream.
- Bounded time — wall-clock timeout per command; on expiry the whole process group is killed (Unix), not just the shell.
Every call is checked by the coder InspectorChain first; first Deny
wins and the denial reason is the tool error the model sees.