Impact
Unbounded tool result bodies can flow into provider payloads without clear byte/cost visibility. Tool storms remain hard to see until context quality or reliability degrades. Sub-session model use, including intentional high-tier consultation, also needs cost attribution rather than prohibition.
Actual behavior
- Tool outputs can enter transcripts/payloads at full size without per-call caps or relevance gates before provider injection.
- There is no sufficiently visible accounting of bytes contributed per tool call, turn, session, or sub-session model call.
Expected behavior
- Configurable per-tool-call size cap with truncation markers and a retrieval path for full artifacts.
- Byte accounting per tool call, turn, and session, surfaced in diagnostics and/or usage UI.
- Sub-session model consultations, including high-tier models when intentionally used, are visible and attributed to the parent/session cost model.
Publishable evidence
- About 247 MB of rollout function-call output.
- Worst injections up to about 1.75M characters.
- About 11k
exec_command calls observed in rollout data.
Scope / non-goals
In scope:
- per-call caps,
- truncation/retrieval UX,
- byte accounting,
- usage attribution for sub-session calls.
Non-goal:
- forbidding or discouraging high-tier model consultation by subagents. This issue is about visibility and attribution, not restriction.
Likely affected areas
Sources/RepoPrompt/Features/AgentMode/Runtime/ToolTracking/
Sources/RepoPrompt/Features/AgentMode/Runtime/Usage/
Sources/RepoPrompt/Features/AgentMode/Runtime/Usage/Claude/
Sources/RepoPrompt/Features/AgentMode/Runtime/Usage/Codex/
Sources/RepoPrompt/Infrastructure/MCP/
Sources/RepoPrompt/Features/AgentMode/Views/
Tests/RepoPromptTests/AgentMode/
Tests/RepoPromptTests/MCP/
Acceptance criteria
Interlinks
Part of #406. Related: #398, #399, and #401.
Impact
Unbounded tool result bodies can flow into provider payloads without clear byte/cost visibility. Tool storms remain hard to see until context quality or reliability degrades. Sub-session model use, including intentional high-tier consultation, also needs cost attribution rather than prohibition.
Actual behavior
Expected behavior
Publishable evidence
exec_commandcalls observed in rollout data.Scope / non-goals
In scope:
Non-goal:
Likely affected areas
Sources/RepoPrompt/Features/AgentMode/Runtime/ToolTracking/Sources/RepoPrompt/Features/AgentMode/Runtime/Usage/Sources/RepoPrompt/Features/AgentMode/Runtime/Usage/Claude/Sources/RepoPrompt/Features/AgentMode/Runtime/Usage/Codex/Sources/RepoPrompt/Infrastructure/MCP/Sources/RepoPrompt/Features/AgentMode/Views/Tests/RepoPromptTests/AgentMode/Tests/RepoPromptTests/MCP/Acceptance criteria
Interlinks
Part of #406. Related: #398, #399, and #401.