Skip to content

feat(codex): pre-trust the spawn folder on disk before the PTY starts - #715

Merged
Juliusolsson05 merged 2 commits into
mainfrom
feat/codex-disk-trust
Aug 31, 2026
Merged

Juliusolsson05 merged 2 commits into
mainfrom
feat/codex-disk-trust

Conversation

@Juliusolsson05

Copy link
Copy Markdown
Owner

Problem

Driving Codex's trust dialog with synthesized keystrokes produced four distinct production failures in one day — #705 (inverted accept bytes, Claude sibling), #711 (clicks refused invisibly), #712 (wake readiness timeout killing a live CLI waiting on its own dialog), #713 (app-hostage modal). One root: the dialog exists at all for sessions the app spawns into a folder the user explicitly chose.

Fixes #714.

Implemented behavior

The folder choice is the trust decision, so it gets recorded where Codex records it — [projects."<path>"] trust_level = "trusted" in $CODEX_HOME/config.toml — before the PTY spawns, and the dialog never appears.

Tests

  • Package (fix(dispatch): close selected dispatch row #45): 9 cases incl. prefix byte-identity on append, byte-for-byte idempotency, untrusted-entry preservation, inline-table stand-down, escaping round-trip, fail-open on unreadable config. 196/196 suite, contract, typecheck.
  • Parent: new launch-ordering case pinning trust:ensure → handoff → resume:start (the write precedes every ownership step and the spawn) and exactly-once-per-attempt, via the existing recorded launch-ladder harness (mock records trust calls in a separate channel so the exact-array assertions of the ladder tests stay byte-identical). Codex runtime suites 18/18; tsc node + web clean.

Notes

🤖 Generated with Claude Code

https://claude.ai/code/session_01E9UW81kpTBiDPhZFpcpjf6

Juliusolsson05 and others added 2 commits August 30, 2026 18:35
Refs #714

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E9UW81kpTBiDPhZFpcpjf6
The user's explicit folder choice is the trust decision; recording it in
$CODEX_HOME/config.toml before spawn means the trust dialog never
appears for app-spawned sessions — retiring the keystroke-driven dialog
path that produced four distinct failures in one day (#705 #711 #712
#713). One await early in CodexSession.start covers fresh spawns,
recover/wake respawns, orchestration children, and worktree cwds at the
single spawn site; the helper never throws and never gates the spawn,
so the dialog condition/modal remain the fallback.

Fixes #714

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E9UW81kpTBiDPhZFpcpjf6
@Juliusolsson05
Juliusolsson05 merged commit 69e6674 into main Aug 31, 2026
2 checks passed
@Juliusolsson05
Juliusolsson05 deleted the feat/codex-disk-trust branch August 31, 2026 01:55
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.

feat(codex): pre-trust project folders on disk before spawn — retire the trust dialog for app-spawned sessions

1 participant