Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/development/STRUCTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,8 @@ shared/
│ ├── client.py # run_agent(), run_agent_async()
│ ├── command.py # build_agent_command() for orchestrator-spawned containers
│ ├── result.py # AgentResult dataclass
│ └── tool_interceptor.py # Pre-execution file write checks (Write/Edit/NotebookEdit) against role restrictions
│ ├── tool_interceptor.py # Pre-execution file write checks (Write/Edit/NotebookEdit) against role restrictions
│ └── tool_output_cap.py # Predictive PreToolUse cap for built-in CC tools (Read/Grep): denies calls likely to overflow the 1 MB SDK buffer before they run; tunable via EGG_TOOL_OUTPUT_CAP / EGG_READ_CAP_BYTES (#2876)
├── egg_anchor/ # Agent anchor mechanism for post-compaction state recovery
│ ├── __init__.py # Public API exports
│ ├── models.py # Pydantic models (AgentAnchor, AnchorMeta, ProgressItem, Decision, BRCState)
Expand Down
9 changes: 9 additions & 0 deletions docs/reference/agent-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,15 @@ falls back to the 100 KB default. The orchestrator measures the cap
against `indent=2`-serialized JSON (matching what its MCP server ships),
so raising the cap toward the buffer size stays safe.

**Built-in tool cap (complementary):** The cap above covers egg-owned MCP
`@tool` payloads. Built-in Claude Code tools (`Read`, `Grep`, etc.) run
inside the CLI and can't be wrapped the same way. [#2876](https://github.com/jwbron/egg/issues/2876)
adds a PreToolUse hook that predicts overflows *before* the tool runs and
denies the call with a narrowing hint. See
[Agent Recovery → Predictive Output Cap](agent-recovery.md#predictive-output-cap-pretooluse)
for the heuristic table and the `EGG_TOOL_OUTPUT_CAP` / `EGG_READ_CAP_BYTES`
operator knobs.

### `cli_command=None` rationale pattern (decision-13)

A `ToolRegistration` declares `cli_command=None` for verbs that have
Expand Down
Loading