Skip to content

feat(sandbox): make codex reasoning summaries configurable via env#543

Open
tarrencev wants to merge 1 commit into
paradigmxyz:mainfrom
tarrencev:feat/codex-reasoning-summary-env
Open

feat(sandbox): make codex reasoning summaries configurable via env#543
tarrencev wants to merge 1 commit into
paradigmxyz:mainfrom
tarrencev:feat/codex-reasoning-summary-env

Conversation

@tarrencev

Copy link
Copy Markdown

Why

The codex CLI bump to 0.139 (#…recent releases) changed behavior: codex no longer emits reasoning summaries unless model_reasoning_summary is set in its config. Since harness/codex/config.toml doesn't set it, the app-server now emits reasoning items with empty summary/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:

codex exec --json --skip-git-repo-check -c model_reasoning_effort='"low"' "What is 17 * 23 - 19?"
# -> no reasoning item, but usage shows reasoning_output_tokens > 0

codex exec --json --skip-git-repo-check -c model_reasoning_effort='"low"' -c model_reasoning_summary='"detailed"' "What is 17 * 23 - 19?"
# -> item.completed {type: reasoning, text: "**Calculating...**"}

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-level model_reasoning_summary or 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.extraEnv chart value; no chart changes needed.

Tested the merge against harness/codex/config.toml for all four cases (unset, insert, replace-existing, invalid) — output stays valid TOML and the existing [features] rewrite is unaffected.

🤖 Generated with Claude Code

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant