Skip to content

docs(investigations): record the Codex 0.154 driver probe for #497 - #1057

Merged
admarble merged 1 commit into
mainfrom
docs/497-codex-driver-probe
Sep 14, 2026
Merged

admarble merged 1 commit into
mainfrom
docs/497-codex-driver-probe

Conversation

@admarble

@admarble admarble commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Records the 2026-09-12 empirical probe of Codex CLI / @openai/codex-sdk 0.154.0 against sequant's assumptions for #497, as docs/investigations/codex-driver-probe-2026-09.md (precedent: opencode-driver-spike.md). Docs + one recorded fixture; no code.

Findings that change #497's design:

  • $skill works in headless exec; all 19 real skills discovered under bare names via an in-repo .agents/skills → ../.claude/skills symlink → CODEX_PHASE_PROMPTS is unnecessary.
  • Hooks run in exec only with --dangerously-bypass-hook-trust; otherwise silently skipped (no stderr, no event). The flag is CLI-only with no config-key equivalent (proved via --strict-config), and the SDK doesn't pass it → driver must be a subprocess, SDK imported for types only.
  • Hook stdin payload is a superset of Claude Code's (tool_name: "Bash", tool_input.command, cwd, session_id) — existing pre-tool.sh may run unmodified.
  • git commit inside a linked worktree succeeds under workspace-write.
  • exec resume still adopts the caller's cwd (Resuming a session silently switches the agent cwd to the caller’s directory openai/codex#4791) — refactor: normalize agent-driver resume semantics (origin-cwd-bound ResumeHandle, driver-owned validation) #674's gate stays mandatory.
  • Non-TTY stdin blocks exec until timeout; item.completed/error items are warnings, not failures.

Also ships src/lib/workflow/drivers/__fixtures__/codex-exec-skill-hook.jsonl (run-1 stream, 10 events, paths scrubbed) for the future parser to be written against.

Not done here: the #497 issue comment (drafted separately), and the build itself (deferred to the #497 fullsolve).

Test plan

  • npm run lint clean
  • staged diff scanned: 0 hits for API keys / absolute local paths
  • fixture event histogram verified (thread.started, 3× error-as-warning, 2× agent_message, command_execution started+completed, turn.completed)

🤖 Generated with Claude Code

…skills, hooks, sandbox, resume, stdin

Empirical results against the real binary that change #497's design:
- $skill works in headless exec; all 19 sequant skills discovered via an
  in-repo .agents/skills -> ../.claude/skills symlink (drops CODEX_PHASE_PROMPTS)
- hooks run in exec only with --dangerously-bypass-hook-trust, else silently
  skipped; the flag is CLI-only, so the driver is a subprocess, SDK for types
- git commit inside a linked worktree succeeds under workspace-write
- exec resume adopts the caller's cwd (openai/codex#4791 still live)
- non-TTY stdin blocks exec until timeout; ErrorItem carries warnings

Ships the scrubbed run-1 JSONL as a fixture for the future parser.

Claude-Session: https://claude.ai/code/session_01LKP1FKm7sK7PEegt7vWhaJ
Entire-Checkpoint: a84d4009e2b9
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