zgjfjfl set Long conversations to "Compact at 544K", and Codex still
compacted every conversation at about 128K. The model is gpt-6-A, with no
context size set on the provider, on v0.1.2281.
Codex 0.165 compacts at min(model_auto_compact_token_limit, 90% of the
window). magpie writes the model's window into the catalog and writes
auto_compact_token_limit only when Long conversations is below that
window. Two things put Codex under 544K, and the row said neither:
- ~/.codex/config.toml's model_context_window or
model_auto_compact_token_limit, at the top or in a profile, which
Codex reads before magpie's catalog. The row now names each key, with
its profile and value, and "Take it out" removes those lines
(agent.CodexCompactHeld, DropCodexCompactHolds,
POST /api/settings/codex-compact-held/drop). Nothing is removed unless
the user clicks.
- The model's own window. gpt-6-A isn't in models.dev, so its window
comes from the provider's own /models list (context_length). A relay
that lists it at 128K makes Codex compact at ~115K, and no Long
conversations value can raise that. The row now names the model Codex
runs (agent.CodexModel, from config.toml's model and the picked
profile) and the window magpie tells Codex, and says a larger one is
set in the provider's Context window (codexWindowUnder).
Which of the two the reporter has is not known: their config.toml and
their relay's list weren't seen.
Run (worktree at origin/main a6951cc63, through mote-run):
- Real Codex 0.165 against a fake Responses server in a sandbox HOME:
config.toml model_context_window = 128000 made it compact at ~115K
with Long conversations at 544K; with the key taken out it didn't.
- go test -tags nogui -run 'TestCodexCompactHeld|TestCodexWindowUnder|
TestCoreScriptBudget|TestI18n' ./internal/agent ./internal/gui: ok.
- go vet -tags nogui for darwin, GOOS=linux and GOOS=windows on
internal/agent and internal/gui: ok. gofmt -l: clean.
- node --test codex-compact-held.test.cjs on the Linux box (wsl-run):
20 of 20 ok, Chromium and WebKit, en/zh/zh-TW/ja/de at 900 and 420px.
On mote Chromium was 10 of 10 ok; mote's Playwright WebKit launch hung
at 180s for every test there, beside another session's full GUI suite.
The first Linux WebKit run was red at 420px in en, ja and de: the test
took scrollTop before Playwright's click scrolled the button into view.
The button is now wheeled into view first (reader.cjs reach), and the
check allows only the browser holding scrollTop under a shorter page.
- i18n-keys.test.cjs: 4 of 4 ok.
- A first GUI run was red in every file: the new block declared `box`
twice in one function (a SyntaxError), so no row drew. Fixed before
this commit. A rerun of codex-async-compact, compact-at and
compact-one-value at this tree was cut short when mote's browsers
stopped launching; codex-async-compact's five Chromium cases had passed
by then. That run was stopped, not finished.
Broken by hand:
- CodexCompactHeld without the profile lookup: its test went red.
- codexWindowUnder forced to nil (`if true ||`): red at line 46.
- CodexModel without the profile lookup: red at line 52.
- The window line turned off (`if (false) hb.append`): codex-compact-held
red in all 10 Chromium cases at the own line's waitFor.
Not tried: a real relay listing gpt-6-A, the reporter's config.toml,
WSL Codex configs, `codex --profile` on the command line, the Codex app.
Core script budget: 1,537,356 -> 1,537,669 for the two lines in Codex's
row, with the comment cut and no room added.