Skip to content

release: v1.4.2 - #93

Merged
sf-jin-ku merged 1 commit into
mainfrom
jin/release-v1.4.2
Jul 30, 2026
Merged

release: v1.4.2#93
sf-jin-ku merged 1 commit into
mainfrom
jin/release-v1.4.2

Conversation

@sf-jin-ku

Copy link
Copy Markdown
Contributor

Summary

Stops the Claude Code ↔ Codex delegation loop for users running both bridge plugins (cc@sendbird in Codex and codex@openai-codex in Claude Code).

Root cause chain: the reverse-direction plugin spawns a bare codex app-server that inherits ~/.codex, so its headless review threads see this plugin's skill index, read SKILL.md, and delegated the review back to Claude Code — then hunted for AskUserQuestion (a Claude Code tool Codex does not have) and spun on Codex's wait collaboration tool for minutes, emitting narration verdicts instead of findings.

Changes

  • Delegation gate: session hooks stamp hostOrigin: "claude-code" on the current-session marker when Claude Code host env markers (CLAUDECODE / CLAUDE_CODE_ENTRYPOINT) reach them (both SessionStart and UserPromptSubmit writers, so a rewrite cannot erase the stamp). review, adversarial-review, and task refuse 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.
  • Skill contract fix: stop naming AskUserQuestion in the review skills. Codex's own request_user_input is gated behind [tools] experimental_request_user_input and 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.
  • Stop gate fix: skip the turn-end review gate when no turn baseline was recorded for the session (baseline is written on 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 check fully green: 510 unit / 45 integration / 22 e2e, 0 fail.
  • New regression tests: hostOrigin stamping (both markers present/absent), delegation refusal for review+task, interactive/other-owner/unstamped fail-open paths, missing-baseline stop-gate skip, and skill-contract assertions that AskUserQuestion never reappears.
  • Live validation against a real Claude Code → Codex nested thread: hostOrigin stamped with the exact nested thread id; broken path (4m07s–6m39s, 2–5 wait spins, narration output) now completes in 68.9s with 0 wait spins and a correct review verdict.

🤖 Generated with Claude Code

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>
@upwind-code-us

upwind-code-us Bot commented Jul 30, 2026

Copy link
Copy Markdown

Upwind Upwind Code Scan - ✅ Proceed with Deployment

0 newly introduced vulnerabilities · 0 resolved · 0 total in this PR vs main

View full analysis in Upwind Console

Scan completed in 14s

Scan history (1 scan)
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

@upwind-code-us

upwind-code-us Bot commented Jul 30, 2026

Copy link
Copy Markdown

Upwind Upwind IaC Scan - ✅ Proceed with Deployment

0 misconfigurations detected

View full analysis in Upwind Console →

Scan completed in 2s

Scan history (1 scan)
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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +264 to +266
const marker = getCurrentSessionMarker(workspaceRoot);
if (!marker || marker.hostOrigin !== "claude-code") {
return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment on lines 299 to 303
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.",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@sf-jin-ku
sf-jin-ku merged commit 5ee1439 into main Jul 30, 2026
5 checks passed
@sf-jin-ku
sf-jin-ku deleted the jin/release-v1.4.2 branch July 30, 2026 07:20
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