codex - ✅(Solved) Fix Regression with writes on 0.121.0 [1 pull requests, 2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#18354Fetched 2026-04-18 05:55:24
View on GitHub
Comments
2
Participants
2
Timeline
10
Reactions
0
Author
Timeline (top)
labeled ×4commented ×2closed ×1cross-referenced ×1

Fix Action

Fixed

PR fix notes

PR #18296: fix: fix fs sandbox helper for apply_patch

Description (problem / solution / changelog)

Summary

  • pass split filesystem sandbox policy/cwd through apply_patch contexts, while omitting legacy-equivalent policies to keep payloads small
  • keep the fs helper compatible with legacy Landlock by avoiding helper read-root permission expansion in that mode and disabling helper network access

Root Cause

d626dc38950fb40a1a5ad0a8ffab2485e3348c53 routed exec-server filesystem operations through a sandboxed helper. That path forwarded legacy Landlock into a helper policy shape that could require direct split-policy enforcement. Sandboxed apply_patch hit that edge through the filesystem abstraction.

The same 0.121 edit-regression path is consistent with #18354: normal writes route through the apply_patch filesystem helper, fail under sandbox, and then surface the generic retry-without-sandbox prompt.

Fixes #18069 Fixes #18354

Validation

  • cd codex-rs && just fmt
  • earlier branch validation before merging current origin/main and dropping the now-separate PATH fix:
    • cd codex-rs && cargo test -p codex-exec-server
    • cd codex-rs && cargo test -p codex-core file_system_sandbox_context
    • cd codex-rs && just fix -p codex-exec-server
    • cd codex-rs && just fix -p codex-core
    • git diff --check
    • cd codex-rs && cargo clean

Changed files

  • codex-rs/core/src/session/turn_context.rs (modified, +16/-13)
  • codex-rs/core/src/tools/runtimes/apply_patch.rs (modified, +11/-0)
  • codex-rs/core/src/tools/runtimes/apply_patch_tests.rs (modified, +55/-1)
  • codex-rs/exec-server/src/file_system.rs (modified, +7/-0)
  • codex-rs/exec-server/src/fs_sandbox.rs (modified, +170/-51)
RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

codex-cli 0.121.0

What subscription do you have?

Pro Lite

Which model were you using?

gpt-5.4

What platform is your computer?

Linux 6.6.87.2-microsoft-standard-WSL2 x86_64 x86_64

What terminal emulator and version are you using (if applicable)?

Warp

What issue are you seeing?

CLI fails to edit files, throws "command failed; retry without sandbox?" on any edit. Retrying without sandbox succeeds. This issue appeared with version 0.121.0, reverting back to 0.120.0 resolves it.

What steps can reproduce the bug?

Request anything requiring editing a file in a repo.

What is the expected behavior?

No response

Additional information

No response

extent analysis

TL;DR

Reverting to Codex CLI version 0.120.0 may resolve the issue with editing files.

Guidance

  • The problem seems to be specific to version 0.121.0 of the Codex CLI, as reverting to 0.120.0 resolves the issue.
  • To verify, try editing a file using the CLI with version 0.120.0 and confirm that it succeeds.
  • If the issue persists, try retrying the edit operation without sandbox, as mentioned in the error message, to see if it temporarily resolves the problem.
  • Consider reporting this issue to the Codex CLI developers or maintainers, as it appears to be a regression introduced in version 0.121.0.

Notes

The exact cause of the issue is not specified, but it seems to be related to the introduction of version 0.121.0. There may be other factors at play, such as interactions with the gpt-5.4 model or the Linux platform.

Recommendation

Apply workaround: Revert to version 0.120.0 until a fixed version of the Codex CLI is released, as it is confirmed to resolve the editing issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING