linkaww on Discord (11-06): "之前在用量 - 上下文把Claude Code缓存改成了1h
请问在哪里改回5m". Usage › Context › Tuned for you is the one place in
the GUI that sets Claude Code's promptCacheTtl, subagentPromptCacheTtl and
a model's autoCompactWindow, and its row (with Undo) came only from advice,
which needs 50 calls in the range. On Today, or a quiet week, the row and
the way back were gone, and an agent with no calls had no card at all.
agent.TuneKept lists the knobs tune put in (its stash, read back as ours,
not under Long conversations). /api/tune adds each one that has no advice
row as a few row, and keeps an agent with none of its own calls when it
has one. The card draws a few row as In use with Undo and "Not enough
calls in this range to tune on", and no curve; the card's totals skip it.
A value the user wrote themselves is not listed. Codex's compact is left
out: Settings changes it.
Run (mote, at this tree):
- go test ./internal/agent ./internal/gui -count=1: agent ok. gui is red only
in TestMainWindowCorners, which is red the same way on a fresh origin/main
92f5fc8fe (#3949). TestTuneKeepsWhatItPutIn and TestCoreScriptBudget pass
(core 1,533,750 at this commit, budget 1,533,802, not raised).
- node --test of context-tune, images-codex-one, chatgpt-image-chip and
settings-lines-wrap, in Chromium and WebKit, in en, zh, zh-TW, ja and de,
at 360 and 1100 wide: 322 pass, 0 fail. i18n-keys is red only in "a
plugin's words are its own", the same on origin/main 8ee85c59f (#5332,
#5426).
- GOOS=linux go vet -tags nogui, GOOS=windows go vet, go vet (agent, gui),
go build ./..., gofmt -l: clean.
Broken by hand:
- TuneKept's result dropped in gui/tune.go: TestTuneKeepsWhatItPutIn fails
("no calls: kept []").
- Without the tuneCard guard, the new context-tune case is red in both
engines: the card throws on a few row and draws nothing.
Not tried: a real Claude Code run reading the put-back value, or the real
app (the live ~/.claude is off limits).
Reported-by: linkaww