Unified exec should suppress editor and progress output by default
What issue are you seeing?
When Codex runs shell commands through unified exec in repositories or build workflows, some common tools can still enter interactive or ANSI/progress output modes despite the existing TERM=dumb, NO_COLOR=1, and pager defaults. This can leak raw control sequences into the Codex transcript or leave commands waiting on an editor.
This is related to the previously closed report #6850 and the merged partial fix #7286. The current unified exec defaults already set PAGER=cat, GIT_PAGER=cat, and GH_PAGER=cat, but they do not currently cover editor-driven Git flows (git merge, git rebase, commit/edit prompts) or other common progress/color environment conventions.
I prepared a small branch from current main that extends the default unified exec environment and updates the existing unit test:
https://github.com/dfredriksen/codex/tree/fix/unified-exec-plain-git-env
Given the contribution policy for external PRs, I am opening this issue first rather than marking an unsolicited PR ready for review.
What steps can reproduce the bug?
Examples that can produce noisy transcript output or editor waits from a Codex shell command:
- In a git repository, run a command path that invokes an editor, such as a merge/rebase/commit flow that needs an edit message.
- Run tools that use forced color/progress output unless explicitly disabled, such as Docker BuildKit progress output.
- Observe raw cursor-control/progress escape sequences in command output or a process waiting for an interactive editor.
What is the expected behavior?
Codex tool-command transcripts should be line-oriented and reviewable by default. Non-interactive Codex command execution should avoid launching editors and should prefer plain progress/color output unless the user explicitly asks for an interactive TTY-like workflow.
Additional information
A proposed focused change is to add these defaults to UNIFIED_EXEC_ENV:
CLICOLOR=0CLICOLOR_FORCE=0EDITOR=trueVISUAL=trueGIT_EDITOR=trueGIT_SEQUENCE_EDITOR=trueGIT_MERGE_AUTOEDIT=noDOCKER_BUILDKIT_PROGRESS=plain
Local branch commit: 15ae078b50.
Local verification attempted:
cargo fmt --checkcompleted successfully, though stable rustfmt prints warnings that the repo'simports_granularity=Itemoption is nightly-only.cargo test -p codex-core unified_exec_envstarted compiling but failed locally because the machine ran out of disk space while writing Rust build artifacts (os error 112).
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗