e4e9eb0928becfa4e48484dde85ef5032671d582
3
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
2abfe2b644 |
codex: the editor extension's bundled Codex version is read, so the threshold is written (HermanHongbb on X)
The background-compaction table is written only when every Codex that reads the config is known to be new enough. The openai.chatgpt extension's reader was always made with no version, so any machine with the extension installed counted as "unknown" and the table, with the threshold, was held out: Codex compacted at its own 65%. The extension ships bin/<target>/codex-package.json beside its codex (checked in the real Open VSX packages of chatgpt 26.51111.21308, Linux x64 and Windows x64: "version": "0.169.0-alpha.11.1"). It is read now, one reader per installed copy, in every dot folder's extensions (VS Code, VS Code Server, Cursor, Windsurf, VSCodium, ...); copies in .obsolete are skipped. A version that can't be read stays unknown, not old. Settings' existing note (codexAsyncHeld) names the editor extension and its version when it is what holds the threshold back. Run: TestExtensionCodexVersionRead (new; red with the version read turned off by hand: got map[:4]), go vet darwin/linux/windows, gofmt, and go test ./internal/agent on mote, ok. Not tried: a live VS Code with the extension; the full suite before the tag. The macOS extension layout is the same package (darwin vsix not unpacked). |
||
|
|
1184862583 |
agent: Codex background compaction writes the bare async_compaction = true where a Codex older than 0.163 reads the config (多喝热水)
多喝热水 (Discord #help, Windows, v0.1.1384, Codex desktop with ChatGPT
sign-in): Codex wouldn't open, "config.toml:154:1: invalid type: map,
expected a boolean". That line is the [features.async_compaction] table
|
||
|
|
1978eabe58 |
agent: Codex's background compaction is turned on from Settings › Long conversations (#2490, #2493)
Codex 0.163 can compact a long conversation in the background while a
turn goes on ([features.async_compaction]). A new row under Long
conversations turns it on, with the share of the window it starts at
(empty: Codex's own 65%). magpie writes it into each Codex config it
routes (codex_async.go):
- [features.async_compaction] enabled = true and
model_async_compact_threshold_percent. Codex reads the threshold only
in that table; one at the top level is ignored (tried).
- capabilities = { remote_compaction = "v2" } on [model_providers.magpie].
Codex starts a background compaction only on a provider with v2, which
it gives OpenAI and Azure alone. Tried with Codex 0.163 against a
sandbox gateway and a fake upstream reporting 70% use: without the
capability, no compaction in a whole turn; with it, compaction_trigger
requests ran beside the turn's steps and the next step's input held
the summary. The capability is written for a feature the user turned
on by hand too (#2493 asked whether magpie supports it: it didn't).
putProvider carries the table's capabilities over when a model switch
writes it again.
- What magpie wrote is in the stash (codex.async). A value the user set,
or changed since, is never written over and stays when the switch is
turned off; a bare async_compaction = true, an inline or a dotted
table is the user's as written. A config that doesn't parse is not
written to.
Not tried: Codex signed in with ChatGPT (openai_base_url to magpie on
the built-in provider, v2 by default), only the custom provider path.
Tests: TestCodexAsyncCompactionWritten, ...KeepsTheUsers and
...KeepsUsersCapability (internal/agent), each red with the matching
part removed by hand (no writing; no capability carry-over; no
ownership check on enabled). codex-async-compact.test.cjs: Chromium and
WebKit, en/zh/zh-TW/ja/de, red with the 1-100 check removed;
compact-at, i18n-keys, settings-general, settings-search pass.
TestSettingsSaveKeepsWhatItDoesNotSend holds the two new fields.
gofmt clean; go vet -tags nogui on darwin, linux, windows.
Full suite: go test -tags nogui -timeout 45m ./... (pipefail, suite-lock) at the four #2494/#2504/#2505/#2490 commits on origin/main
|