feat(sandbox): make codex reasoning summaries configurable via env#543
Open
tarrencev wants to merge 1 commit into
Open
feat(sandbox): make codex reasoning summaries configurable via env#543tarrencev wants to merge 1 commit into
tarrencev wants to merge 1 commit into
Conversation
Codex >= 0.139 no longer emits reasoning summaries unless model_reasoning_summary is set, so renderers (e.g. the Slack adapter) silently lost the embedded thinking trace after the CLI bump: the reasoning item arrives with empty summary/content. Let deployments opt back in without rebuilding the sandbox image: the entrypoint merges CODEX_MODEL_REASONING_SUMMARY (auto | concise | detailed | none, settable through sandbox.extraEnv) into the generated ~/.codex/config.toml, replacing an existing top-level key or inserting one before the first table. Invalid values warn and are ignored rather than breaking every sandbox boot.
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.
Why
The codex CLI bump to 0.139 (#…recent releases) changed behavior: codex no longer emits reasoning summaries unless
model_reasoning_summaryis set in its config. Sinceharness/codex/config.tomldoesn't set it, the app-server now emits reasoning items with emptysummary/content, and downstream renderers (e.g. the Slack adapter, which reads the reasoning item text) silently lost the embedded thinking trace.Reproduce on codex 0.139.0:
What
Make it configurable per deployment instead of baking a default into the image: the sandbox entrypoint merges
CODEX_MODEL_REASONING_SUMMARY(auto|concise|detailed|none) into the generated~/.codex/config.toml— replacing an existing top-levelmodel_reasoning_summaryor inserting one before the first table. Invalid values warn to stderr and are ignored so a typo can't break every sandbox boot.Deployments opt in through the existing
sandbox.extraEnvchart value; no chart changes needed.Tested the merge against
harness/codex/config.tomlfor all four cases (unset, insert, replace-existing, invalid) — output stays valid TOML and the existing[features]rewrite is unaffected.🤖 Generated with Claude Code