Repository navigation
Conversation
The app-server reads thread_unload_delay_secs only from its own startup config, so passing it in the thread config had no effect. Move it to a `-c` startup override, the same way hooks already are.
This branch has not been deployed
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.
CODEX_CONFIGgets merged into each thread's config, but the app-server never readsthread_unload_delay_secsfrom a thread's config. It only uses its own startup config (self.config.thread_unload_delayinthread_processor.rs). So setting it throughCODEX_CONFIGdoes nothing, and a closed session keeps its MCP servers running for the default 60s whatever you set.Repro: a throwaway
CODEX_HOMEwith one stub stdio MCP server,CODEX_CONFIG='{"thread_unload_delay_secs":5}', thensession/newandsession/closewith no prompt. Then time how long the stub process lives after the close:session/closesession/closeOn main the adapter log shows
"thread_unload_delay_secs":5going out in thethread/startconfig, where Codex ignores it.Change
hooksalready move fromCODEX_CONFIGto-coverrides when the app-server starts. This putsthread_unload_delay_secson the same list. Every other key still goes to the thread config as before.The helper isn't hooks-only anymore, so
CodexHookConfig.ts/prepareCodexHookConfigare renamed toCodexStartupConfig.ts/prepareCodexStartupConfig.readme-dev.mdmentions the new key.I only added the key I could check end to end. Other app-server level keys might have the same problem, and they'd go on the same list.
Testing
CodexStartupConfig.test.ts: fails on main, passes herenpm run typecheck,npm test,npm run test:integrationandnpm run buildpass