Repository navigation
Preserve Codex agents configuration across Gateway overlay lifecycle #199
Description
Outcome
Prove that CodexHub preserves Codex rust-v0.145.0 agent configuration across Gateway connect, Stable/Developer takeover, restart, and restore without silently enabling or rewriting multi-agent V2.
Problem
rust-v0.145.0 consolidates shared settings under [agents], including enabled, max_concurrent_threads_per_session, default_subagent_model, default_subagent_reasoning_effort, and role definitions. CodexHub's overlay is designed to preserve unknown TOML, but there is no dedicated regression contract for these tables and nested role/config-file values.
Scope
- Add representative [agents] and nested role fixtures to the config overlay tests.
- Cover the canonical concurrency key and retained legacy max_threads alias without normalizing user-owned text unnecessarily.
- Preserve default subagent model/reasoning settings and role config_file references.
- Preserve structured multi_agent_v2 feature configuration and explicit user enable/disable choices.
- Verify connect, takeover, interrupted update, restart/readback, and restore.
- Keep CodexHub from auto-enabling V2 or choosing role/model defaults on the user's behalf.
- No new UI is required in this issue.
Acceptance criteria
- User-authored [agents], nested roles, and relevant feature configuration survive every overlay lifecycle semantically unchanged.
- Stable/Developer takeover does not drop or duplicate agent tables.
- Restore returns the exact pre-owned configuration modulo documented CodexHub-owned sections.
- Unknown future agent keys remain preserved.
- CodexHub never writes multi_agent_v2 = true unless an existing explicit user-owned value is being preserved.
- Existing provider, model, context-budget, ownership, and backup behavior remains unchanged.
Verification
python -m pytest -q tests/test_config_overlay.py
python -m pytest -q
git diff --check
python scripts/report_quality_gates.py
Verification class is strict because this is a persisted configuration and ownership contract.
Relationships
- Related to 0.1.8 Beta2: Define the Codex CLI 0.146 Collaboration V1/V2 schema boundary #64 and Official rust-v0.145.0 qualification.
- Source assessment: docs/research/2026-07-22-codex-rust-v0.145.0-subagent-v2-impact.md.
- Scheduled after the current connection-stability chain in Wayfinder: CodexHub 0.1.6–0.3.0 Gateway and release roadmap #147.
Activity
NOirBRight commentedon Jul 29, 2026
0.1.8 Beta1 role
Preserve the user’s existing
[agents]configuration and the selected collaboration backend across Gateway overlay apply/readback/restore. This is configuration safety for #252; it does not include sidebar task APIs or the full cross-Home history migration deferred to #197.7 remaining items
NOirBRight commentedon Jul 30, 2026
Repair review delta is ready at exact SHA
415a45f077dc03f0cc051b09b6121aad4bc14770oncodex/issue-199-agents-config.MISSING_RECOVERY_ANCHOR, retain all evidence, and have an explicit offline quarantine/recovery boundary in the evidence README.Candidate verification:
106 passed, 186 subtests passed1519 passed, 1 skipped, 598 subtests passedpy_compile,compileall, andgit diff --check: passedImmutable evidence: https://github.com/NOirBRight/CodexHub/blob/415a45f077dc03f0cc051b09b6121aad4bc14770/docs/evidence/issue-199/README.md
No merge or issue closure was performed. A fresh independent exact-SHA Standards/Spec review remains required.
fix: re-anchor takeover recovery for context guard (#199)
fix: preflight takeover re-anchor recovery (#199)
NOirBRight commentedon Jul 31, 2026
0.1.8 roadmap placement
This configuration-safety gate now belongs to beta.3 and blocks the model-specific V2 tracer bullets #282/#283. It no longer blocks beta.1 core Responses. PR #260 remains the current reviewed implementation candidate.
NOirBRight commentedon Jul 31, 2026
#260 已关闭并延后:该工作项保留为 0.1.8 Beta3,后续基于最新 dev 重新实现并重新审查;现有 #260 分支不作为完成证据。
NOirBRight commentedon Aug 2, 2026
Roadmap correction: this configuration-safety work belongs to 0.1.8-beta.4 and blocks #252/#282 under #284. Closed PR #260 remains non-evidence; reimplementation starts from current dev.
NOirBRight commentedon Aug 10, 2026
Beta4 implementation complete and merged via #400.
Evidence:
907a78938e0aee7a6e27a313c356b43a5d62b0b3ceb80a41c76c6fe0736824815e80de3dd463dbb3git diff --check origin/dev...HEAD: passedThe current production overlay already preserves
[agents]safely, so no production routing/configuration code was changed. The regression matrix binds canonical and legacy concurrency keys, nested roles/config files, defaults, unknown fields, scalar V1, structured V2 enabled/disabled, missing V2, apply/restart/readback, bidirectional takeover, interrupted recovery, backups, and exact restore.