release: v1.4.2 - #93
Conversation
Stop the Claude Code <-> Codex delegation loop for users running both bridge plugins. A Codex app-server spawned from inside Claude Code inherits ~/.codex, so its headless review threads read this plugin's skills and delegated the review back to Claude Code, spinning on the wait tool for minutes and returning narration instead of findings. Session hooks now stamp hostOrigin on the current-session marker when Claude Code host env markers reach them, and review/adversarial-review/ task refuse delegation from such threads with instructions to do the work directly. The review skills stop naming AskUserQuestion (a Claude Code tool Codex lacks) and proceed with the recommended mode headless, and the turn-end review gate skips sessions with no recorded user turn. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
| Commit | Scanned at | New | Resolved | Net |
|---|---|---|---|---|
7f928c4 < |
2026-07-30 05:19 UTC | 0 | 0 | 0 |
Last scanned: 7f928c4 · 2026-07-30 05:19 UTC
|
| Commit | Scanned at | New | Resolved | Net |
|---|---|---|---|---|
7f928c4 < |
2026-07-30 05:19 UTC | 0 | 0 | 0 |
Last scanned: 7f928c4 · 2026-07-30 05:19 UTC
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7f928c40f3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const marker = getCurrentSessionMarker(workspaceRoot); | ||
| if (!marker || marker.hostOrigin !== "claude-code") { | ||
| return; |
There was a problem hiding this comment.
Scope host-origin markers to the invoking session
When a Claude-driven thread and a normal Codex session are open in the same workspace, both hooks overwrite the same workspace-global current-session.json; the normal session writes an unstamped marker. Because the Claude-driven companion lacks SESSION_ID_ENV, this check can then read the other session's marker and return, allowing delegation back to Claude Code and recreating the loop this change is intended to prevent. Store and resolve origin per session/thread at the shared state boundary rather than treating the workspace's last writer as the caller.
AGENTS.md reference: AGENTS.md:L4-L4
Useful? React with 👍 / 👎.
| return { | ||
| shouldSkipReview: false, | ||
| shouldSkipReview: true, | ||
| skipStatus: "skipped_no_turn_baseline", | ||
| skipNote: STOP_REVIEW_NO_BASELINE_NOTE, | ||
| reason: "No turn baseline was recorded for this session.", |
There was a problem hiding this comment.
Preserve review enforcement when baseline capture fails
If UserPromptSubmit ran but captureTurnBaseline() failed—for example because fingerprinting encountered a transient Git/filesystem error—the hook catches that error and leaves no baseline. This branch now treats the missing baseline as proof that no prompt occurred and silently skips an enabled turn-end review, whereas the previous behavior ran the review in this case. Distinguish an explicitly headless session from a baseline-capture failure instead of failing open for every absent or unreadable baseline.
Useful? React with 👍 / 👎.
Summary
Stops the Claude Code ↔ Codex delegation loop for users running both bridge plugins (
cc@sendbirdin Codex andcodex@openai-codexin Claude Code).Root cause chain: the reverse-direction plugin spawns a bare
codex app-serverthat inherits~/.codex, so its headless review threads see this plugin's skill index, readSKILL.md, and delegated the review back to Claude Code — then hunted forAskUserQuestion(a Claude Code tool Codex does not have) and spun on Codex'swaitcollaboration tool for minutes, emitting narration verdicts instead of findings.Changes
hostOrigin: "claude-code"on the current-session marker when Claude Code host env markers (CLAUDECODE/CLAUDE_CODE_ENTRYPOINT) reach them (bothSessionStartandUserPromptSubmitwriters, so a rewrite cannot erase the stamp).review,adversarial-review, andtaskrefuse delegation from such threads with instructions to perform the work directly in that thread. Fail-open everywhere the loop cannot occur: interactive sessions (env session id present), background forwarding children owned by a different session, and unstamped state.AskUserQuestionin the review skills. Codex's ownrequest_user_inputis gated behind[tools] experimental_request_user_inputand does not exist in non-interactive threads, so the ask is now conditional on a question tool actually existing; headless threads proceed with the recommended mode.UserPromptSubmit, so its absence means no user turn drove the session — nothing to review). Previously a missing baseline ran the full Claude review.Testing
npm run checkfully green: 510 unit / 45 integration / 22 e2e, 0 fail.AskUserQuestionnever reappears.waitspins, narration output) now completes in 68.9s with 0waitspins and a correct review verdict.🤖 Generated with Claude Code