Background
agenttrace already reports local tokens, estimated cost, context pressure, large parameters, retry loops, repeated tool output, and slow-run evidence. A small product gap remains: users can see that a session was expensive, but the report does not always connect that cost to an avoidable local evidence pattern in plain language.
Evidence
- Product validation on
origin/master at 08cf27e generated demo overview JSON with total_tokens, total_cost, health_trend, tool_fail_rate, and incident timeline evidence, but no explicit local "possible cost driver" explanation in summary.
- Current docs already position slow-task diagnosis around large params and context pressure, so this is an explanation-layer refinement rather than a new capability claim.
- Public ecosystem signal shows developers are actively trying to understand and reduce token/context waste in Claude Code and Codex-style workflows:
- Duplicate check found no existing issue for
context pressure token waste cost, large params context pressure cost driver diagnostics, or token waste avoidable spend context.
User value
When a local session has high spend or token usage, users should quickly understand whether the likely driver was context pressure, large tool parameters/output, retry loops, or long idle/rework patterns, without reading every raw trace.
Adoption rationale
Developer experience improves when the overview report turns existing local evidence into a conservative next diagnostic clue. This strengthens Reliability value while staying local-first and privacy-preserving.
Suggested scope
- Add a conservative
possible_cost_driver or equivalent note to JSON overview summary or session-level output using existing evidence only.
- Surface the same idea in Markdown/HTML/text overview where appropriate, using wording such as "possible driver" rather than guaranteed savings.
- Prefer already-computed signals: context pressure, large parameters, repeated tool output/retry loop, high tool failure rate, long gaps, or high tokens per assistant turn if already available.
- Keep output deterministic and fixture-backed.
Non-goals
- Do not index prompt content or raw conversation text.
- Do not add prompt compression, output suppression, memory capture, vector search, context injection, or MCP behavior.
- Do not build a billing dashboard, hosted telemetry, or external pricing integration.
- Do not claim guaranteed token savings.
- Do not add new parser/source support.
Acceptance criteria
- Demo or fixture-backed overview output includes a conservative possible cost-driver note when existing local evidence supports one.
- JSON output remains stable and documented by the relevant report/output contract checks.
- Markdown/HTML/text output, if touched, uses local evidence wording and avoids hosted-observability or savings claims.
go test ./... passes.
- Relevant CI scripts pass, especially report semantics, deterministic output, and output contract if changed.
Suggested lane
lane/product, priority/P2, status/ready-for-agent
Risk
Medium. The user-facing value is small but useful; the main risk is overclaiming causality from heuristic evidence, so wording must stay conservative.
Source
source/product: Product validation and ecosystem signal scan on 2026-05-20.
Background
agenttrace already reports local tokens, estimated cost, context pressure, large parameters, retry loops, repeated tool output, and slow-run evidence. A small product gap remains: users can see that a session was expensive, but the report does not always connect that cost to an avoidable local evidence pattern in plain language.
Evidence
origin/masterat08cf27egenerated demo overview JSON withtotal_tokens,total_cost,health_trend,tool_fail_rate, and incident timeline evidence, but no explicit local "possible cost driver" explanation insummary.context pressure token waste cost,large params context pressure cost driver diagnostics, ortoken waste avoidable spend context.User value
When a local session has high spend or token usage, users should quickly understand whether the likely driver was context pressure, large tool parameters/output, retry loops, or long idle/rework patterns, without reading every raw trace.
Adoption rationale
Developer experience improves when the overview report turns existing local evidence into a conservative next diagnostic clue. This strengthens Reliability value while staying local-first and privacy-preserving.
Suggested scope
possible_cost_driveror equivalent note to JSON overview summary or session-level output using existing evidence only.Non-goals
Acceptance criteria
go test ./...passes.Suggested lane
lane/product, priority/P2, status/ready-for-agent
Risk
Medium. The user-facing value is small but useful; the main risk is overclaiming causality from heuristic evidence, so wording must stay conservative.
Source
source/product: Product validation and ecosystem signal scan on 2026-05-20.