fix(codex): preserve context config in remote sessions - #1633
Open
NightWatcher314 wants to merge 1 commit into
Open
fix(codex): preserve context config in remote sessions#1633NightWatcher314 wants to merge 1 commit into
NightWatcher314 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Findings
- None.
Questions
- None.
Summary
Review mode: initial
No high-confidence issues found in the added or modified lines. Static review covered the config/read handshake, value validation and fail-open behavior, and propagation through fresh, resumed, imported-fork, /compact, and /goal thread initialization paths. Residual testing gap: the new launcher test directly asserts fresh and resumed threads only; the specialized imported-fork, /compact, and /goal paths rely on the shared builder without path-specific assertions.
Testing
- Not run (automation; PR code treated as untrusted). GitHub integration passed; test was pending at review time.
HAPI Bot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
codex app-serverusingconfig/readmodel_context_windowandmodel_auto_compact_token_limitthrough the shared thread config/compact, and/goalthread pathsconfig/readCloses #1631.
Why
HAPI remote sessions use
codex app-serverand per-thread configuration. Without explicitly preserving these two effective config values, a selected model can fall back to its catalog context window even when direct Codex sessions honor larger values from~/.codex/config.toml.Validation
bun run typecheckbun run test0.147.0confirmedconfig/readreturns:model_context_window = 400000model_auto_compact_token_limit = 300000