# Tighten agent token brief stop gate

`53bff77`→[main](/content/gh/entireio/cli/commits/main/index.html)

## Sessions

1051aa7485b2 View transcript

## Changes

2

- cmd/entire/cli

- Msession_tokens.go +1/-1

- Msessions_test.go +5/-1

```
527 unmodified lines

case hasTokenRecommendation(report, "api-call-amplification"):
	return agentBriefCostProxyBatchAction, true
case hasTokenRecommendation(report, "context-replay-hotspot"):
	return "Use at most 2 focused reads after summarizing known findings, then answer. Avoid broad grep, broad diffs, and broad tests.", true
	return "Use at most 2 focused reads only if a named file or test can change the answer; otherwise answer now. Avoid broad grep, broad diffs, and broad tests.", true
case hasTokenRecommendation(report, "subagent-heavy"):
	return "Do not launch broad subagents. Use one narrowly scoped check with a concrete expected output.", true
case hasTokenRecommendation(report, "high-context-pressure"):
```

Mcmd/entire/cli/session_tokens.go +1/-1

```
1327 unmodified lines

"Token usage: 6213.6k total; 97.4% cache/context replay; 70 API calls."
"Next best action:"
"Use at most 3 batched reads before answering."
"Continue only if a named file or test can change the verdict; otherwise answer now."
"Avoid broad grep, broad diffs, broad tests, and repeated token diagnostics; keep the answer tight."
"Signals:"
"- Cache/context replay dominates token volume."
```

out := stdout.String()
checks := []string{
	"Token usage: 637.7k total; 95.5% cache/context replay; 3 API calls.",
	"Use at most 2 focused reads after summarizing known findings, then answer.",
	"Use at most 2 focused reads only if a named file or test can change the answer; otherwise answer now.",
	"Avoid broad grep, broad diffs, and broad tests.",
	"- Cache/context replay dominates token volume.",
}

"Session: test-cost-proxy-brief"
"Use at most 3 batched reads"
"Avoid broad grep, broad diffs, broad tests"
"otherwise answer now"
"keep the answer tight"
"- Cache write/new context pressure is elevated."
"- Output pressure is elevated."

"Checkpoint: c05e500cafe0"
"Use at most 3 batched reads"
"Avoid broad grep, broad diffs, broad tests"
"otherwise answer now"
"keep the answer tight"
"- Cache write/new context pressure is elevated."
"- Output pressure is elevated."

"Token usage: 6213.6k total; 97.4% cache/context replay; 70 API calls."
"Next best action:"
"Use at most 3 batched reads before answering."
"Continue only if a named file or test can change the verdict; otherwise answer now."
"Avoid broad grep, broad diffs, broad tests, and repeated token diagnostics; keep the answer tight."
"Signals:"
"- Cache/context replay dominates token volume."
