Skip to content

fix: Codex managed worker の cross-review 起動を修正 - #67

Merged
hirokisakabe merged 7 commits into
mainfrom
fix-codex-managed-worker-cross-review-nested-sandbox-66
Sep 27, 2026
Merged

hirokisakabe merged 7 commits into
mainfrom
fix-codex-managed-worker-cross-review-nested-sandbox-66

Conversation

@hirokisakabe

@hirokisakabe hirokisakabe commented Sep 27, 2026 •

Copy link
Copy Markdown
Owner

close #66

概要

Codex CLI の managed workspace-write worker 内で nested codex exec が macOS sandbox に拒否される問題を修正します。

  • cross-review 用 diff は worker sandbox 内で mode 0600 の一時 file に生成
  • sandbox 外へ出すのは reviewer process の exact command だけに限定
  • 子 reviewer は --ask-for-approval never + --sandbox read-only に固定
  • Auto-review の拒否・timeout・起動失敗時は権限拡大や別 backend への fallback をせず blocker 化
  • Claude Code の claude -p --allowedTools "Read" 経路を維持

変更箇所

  • skills/cross-review/SKILL.md
  • skills/issue-implement/SKILL.md
  • skills/issue-dispatch/SKILL.md
  • AGENTS.md
  • README.md

変更した3 skill の version は release consistency check に合わせて 3.2.0 に統一しています。

検証

managed worker 成功経路

  • codex exec --approve-for-me --worktree の本 worker で reviewer process の exact command が Auto-review 承認
  • marker reviewer: REVIEWER_OK、exit 0
  • 起動ログ: approval: never / sandbox: read-only
  • 最終 cross-review: exit 0、critical 0 / warning 0 / info 0
  • diff 一時 file: mode 0600、review 後に削除済み
  • review 前後で branch / HEAD / worktree に意図しない変更なし
  • git diff --check origin/main...HEAD: 成功

reviewer 起動失敗経路の再現手順

  1. disposable な managed worker で diff を worker sandbox 内の mode 0600 一時 fileへ生成する。
  2. reviewer process の exact-command escalation を Auto-review で拒否するか、timeout / non-zero failure を発生させる。
  3. worker が exact command、Auto-review 状態または rationale、exit code / stderr を含む blocker を返すことを確認する。
  4. 一時 file が通常 sandbox 内で削除されることを確認する。
  5. 通常 sandbox での reviewer 再試行、権限拡大、別 CLI / backend / primitive への fallback が行われないことを確認する。

実装方針の選択

  1. dispatcher 側への review 移管は、未 push の worker-local diff 取得と worker 再開 protocol が現行契約にないため不採用。
  2. reviewer process の exact-command Auto-review を採用。diff 生成は worker sandbox 内に維持し、子 reviewer の read-only / approval-never 境界を固定。
  3. 代替 reviewer primitive は候補2で受け入れ条件を満たしたため未採用。

@hirokisakabe
hirokisakabe merged commit 0cb7896 into main Sep 27, 2026
1 check passed
@hirokisakabe
hirokisakabe deleted the fix-codex-managed-worker-cross-review-nested-sandbox-66 branch September 27, 2026 06:53
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.

fix: Codex managed worker内のcross-reviewがnested sandboxで失敗する

1 participant