Repository navigation
Description
Machine-Readable Contract
contract_schema_version: v1
parent_issue: none
issue_kind: implementation
goal_ref: >
worktree-agent-runtime-smoke が起動する Claude Code / Claude-GPT invocation が Claude native peer messaging を
使用せず、default interactive lane では pre-existing/human Herdr namespace を探索・一覧・snapshot・操作・message せず、同一 main session の Agent spawn から terminal
completion の観測を阻害しないように、harness-owned invocation-local policy を追加する。`--require-session-baseline-preservation` が明示された場合だけ、pre-existing Herdr session baseline preservation observation を opt-in で実行する。
change_kind: workflow-runtime
relationship: standalone_follow_up
native_relationships: none
related:
- "#2176 (historical Herdr isolation)"
- "PR #2222 (historical runtime-smoke lifecycle evidence)"
- "#2219 (historical runtime-smoke expansion)"
- "#1830 (historical advisory workflow boundary)"
- "#2403 (related)"
- "PR #2407 (related/historical; out of scope)"Parent Issue
なし(standalone follow-up。native parent / dependency / blocked-by / blocking は設定しない)
Parent Goal Ref
Harness-started runtime-smoke invocation に invocation-local peer policy を適用し、Claude native peer messaging を使用させず、in-session Agent(...) spawn→terminal completion と、default interactive lane の fresh isolated Herdr session・ambient HERDR_* stripping・self-cleanup を維持する。pre-existing Herdr session baseline observation は --require-session-baseline-preservation の明示 opt-in 時だけ実行する。
Remaining Parent Gaps
親Issueなし。#2403/PR #2407等は関連/歴史参照のみで変更しない。
Background
This is a standalone follow-up: it has no native parent, dependency, blocked-by, or blocking relationship. #2176, PR #2222, #2219, #1830, #2403, and PR #2407 are related or historical references only.
The runtime-smoke runner currently keeps structured execution as a direct subprocess and runs interactive execution in a fresh named Herdr session after stripping ambient HERDR_* identity. By default it does not explore, list, snapshot, operate on, or message pre-existing/human Herdr namespaces. Only an explicit --require-session-baseline-preservation opt-in performs before/after observation for pre-existing Herdr session baseline preservation. That namespace isolation does not by itself control Claude Code native cross-session tools. The smallest appropriate change is a harness-owned invocation-local Claude policy: native structured and interactive settings set crossSessionInbound: "refuse" and deny bare SendMessage and ListAgents; Claude-GPT extends its existing fixed runtime-smoke settings/profile channel without reopening arbitrary --settings passthrough.
This is not an absolute security boundary. The contract is limited to the initial/effective policy of processes started by this harness not being weakened by caller prompt or public smoke CLI input. Hostile/self-relaunch behavior, OS sandboxing, Unix-user/VM/account isolation, and caller-proof global enforcement are outside this Issue.
The top-level coordinator is not a verification dependency or handoff through an independent peer. Guidance must say that canonical-root contention uses existing safe mechanism, bounded wait, safe-point retry, or explicit SKIP/FAIL reason; it does not SendMessage an independent peer. Do not introduce a top-level global hard deny or policy engine.
Outcome
Harness-started runtime-smoke の initial/effective invocation policy に crossSessionInbound: "refuse" と bare SendMessage / ListAgents deny を固定し、human peer を観測せずに Agent(...) spawn→terminal completion と default interactive lane の fresh isolated Herdr boundary を維持する。pre-existing Herdr session baseline observation は --require-session-baseline-preservation の明示 opt-in 時だけ実行する。これは absolute security boundary ではない。
Current Validated Scope
- Native structured and interactive harness invocations receive harness-owned settings injection with
crossSessionInbound: "refuse"and bareSendMessage/ListAgentsdeny. - Claude-GPT receives the same policy only through its fixed launcher-owned runtime-smoke profile/channel; arbitrary caller settings passthrough remains closed.
- The controlled canary checks generated settings and spawned-process tool absence/denial without starting, sending to, or observing a human/independent peer.
- Required in-session
Agent(...)spawn→terminal completion/lifecycle evidence remains the supported coordination path; post-spawn peer or subagent SendMessage coordination is not required. - Structured execution remains a direct subprocess. The default interactive lane creates a fresh random/named isolated Herdr session, strips ambient
HERDR_*, cleans up only its own session, and does not explore, list, snapshot, operate on, or message pre-existing/human Herdr namespaces. Pre-existing Herdr session baseline preservation observation runs only with explicit--require-session-baseline-preservation. - Coordinator behavior is guidance only: independent peers are not verification dependencies/handoffs, and canonical-root contention follows existing safe mechanisms, bounded wait, safe-point retry, or explicit SKIP/FAIL reason.
In Scope
- Generate and inject harness-owned native Claude settings for structured direct subprocess and interactive isolated-Herdr invocations with
crossSessionInbound: "refuse"andpermissions.deny: ["SendMessage", "ListAgents"]. - Narrowly extend the existing launcher-owned Claude-GPT runtime-smoke settings/profile path with the same policy while retaining rejection of arbitrary caller
--settingsand policy-bypass inputs. - Preserve structured direct-subprocess semantics. Preserve the default interactive lane's fresh random/named isolated Herdr session, ambient
HERDR_*stripping, and cleanup of only its own session, without exploring, listing, snapshotting, operating on, or messaging pre-existing/human Herdr namespaces; perform before/after pre-existing Herdr baseline preservation observation only with explicit--require-session-baseline-preservation. - Add focused static/generated-settings and controlled spawned-process canaries, lifecycle evidence, bounded feature-unavailable SKIP handling, and minimal runtime-smoke workflow guidance.
Acceptance Criteria
- AC1: Native structured and interactive harness argv/settings generation contains exactly
crossSessionInbound: "refuse"and a barepermissions.denyentry for bothSendMessageandListAgents; the settings are harness-owned invocation-local input and do not rewrite global Claude settings. - AC2: Claude-GPT runtime-smoke generated settings/profile contains the same three policy values only through its existing launcher-owned fixed channel; arbitrary caller
--settingsor public CLI policy input cannot weaken that generated invocation policy. - AC3: Focused tests verify generated settings exactly, and a controlled spawned test process reports
SendMessageandListAgentsabsent or denied. The canary neither starts nor observes a human/independent peer and neither records peer transcript, turn, message, or session state. - AC4: With the bare peer-tool deny in effect, the required in-session
Agent(...)spawn and terminal completion/lifecycle evidence remain observed. The contract does not require post-spawn SendMessage, resume, agent-team, or other subagent messaging coordination. - AC5: Default interactive execution still creates and cleans only its own fresh random/named isolated Herdr namespace, strips ambient
HERDR_*, and does not explore, list, snapshot, operate on, or message pre-existing/human Herdr sessions. Only an explicit--require-session-baseline-preservationopt-in performs before/after pre-existing Herdr session baseline preservation observation. Structured execution remains a direct subprocess and performs no Herdr control-plane mutation. - AC6: Runtime evidence uses only these bounded names with configured versus observed meaning preserved:
peer_policy_configured,cross_session_inbound_configured_refuse(configured),outbound_peer_tools_absent,agent_spawn_completion_observed,herdr_namespace_isolated, andpreexisting_herdr_preserved(observed).preexisting_herdr_preservedretains its existing evidence key/type and is observed only for explicit--require-session-baseline-preservation; outside that opt-in it is unavailable/null rather than inferred or fabricated from a prior SKIP. No inbound behavioral proof is claimed and no controlled sender targets a human peer. - AC7: On macOS/Linux/WSL2 Claude Code v2.1.224+ or native Windows v2.1.234+ where the feature is available, runtime-smoke validates the policy. Where the feature/runtime is unavailable it exits under the existing bounded explicit SKIP convention with a reason code; it does not add a broad compatibility harness or complicate the normal WSL2 path.
- AC8: Runtime-smoke guidance leaves independent peers out of coordinator verification dependency/handoff. Canonical-root contention uses an existing safe mechanism, bounded wait, safe-point retry, or explicit SKIP/FAIL reason, without adding a lease, mutex, peer registry, daemon, or new workflow enforcement mechanism.
Required Design References
docs/dev/runtime-verification-policy.mddocs/dev/agent-runtime-ops.md.claude/skills/worktree-agent-runtime-smoke/SKILL.md.claude/skills/worktree-agent-runtime-smoke/references/claude-code.md
Required Skills
worktree-agent-runtime-smoke
Runtime Verification Applicability
decision: immediate
reason: >
This changes extension/lifecycle runtime policy for harness-started Claude processes and requires runtime evidence in addition to focused static tests. Default interactive evidence must not inspect pre-existing/human Herdr namespaces; their baseline-preservation observation is only an explicit `--require-session-baseline-preservation` opt-in.
applicable_acs:
- AC1
- AC2
- AC3
- AC4
- AC5
- AC6
- AC7
- AC8
execution_environment: >
A linked worktree, Python/uv, pytest, pnpm dependencies, and authenticated/installed Claude plus Herdr only for the real runtime-smoke lane; the default lane uses its own fresh isolated session and does not inspect pre-existing/human Herdr namespaces. `--require-session-baseline-preservation` is used only when intentional opt-in baseline observation is required; network/auth prerequisites follow docs/dev/runtime-verification-policy.md.
skip_conditions: >
If Claude/Herdr or the relevant documented cross-session feature is unavailable, or a real Herdr isolated-session launch is prevented by nested-session policy or equivalent execution-environment constraint, use the existing exit-77 explicit SKIP convention with a bounded reason code and do not classify SKIP as PASS.
fallback_policy: >
A fallback, mock-only result, unavailable feature, or SKIP is not runtime PASS; focused tests may pass independently but do not satisfy the required live runtime evidence. A real-Herdr isolated-session launch blocked by nested-session policy is runtime SKIP exit 77 with a bounded reason code, not PASS.
artifact_requirements: >
Write only the existing worktree-local allowlisted runtime-smoke artifacts/runtime-smoke/<run-id>/summary.md evidence; exclude raw prompts, transcripts, credentials, HOME paths, human Herdr/session state, and peer content. Preserve `preexisting_herdr_preserved` as its existing bounded observed evidence key/type only for explicit opt-in baseline observation; outside that opt-in record it as unavailable/null and never manufacture interactive PASS from a prior SKIP.Verification Commands
# AC1
# AC3
# AC4
# AC5
# AC6
# AC7
# AC8
$ uv run pytest scripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke.py scripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_herdr_isolation.py scripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_workspace_snapshot.py
# AC2
$ uv run pytest scripts/claude-gpt/test_launch_transport_policy.py
$ pnpm typecheck
$ pnpm lint
$ pnpm test
$ pnpm build
$ uv run pytest .claude/skills/gemini-cli-headless-delegation/tests/test_model_routing.pyAllowed Paths
scripts/agent-ops/run_worktree_agent_runtime_smoke.pyscripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke.pyscripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_herdr_isolation.pyscripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_workspace_snapshot.py.claude/skills/worktree-agent-runtime-smoke/SKILL.md.claude/skills/worktree-agent-runtime-smoke/references/claude-code.mdscripts/claude-gpt/launch.shscripts/claude-gpt/test_launch_transport_policy.pydocs/dev/agent-runtime-ops.mddocs/dev/runtime-verification-policy.md
Out of Scope
- Native GitHub parent/dependency changes or treating 実装: worktree-agent-runtime-smoke に claude-gpt launcher 選択入力を追加する (#2174) #2176, PR feat: worktree-agent-runtime-smoke に claude-gpt 同一 session multi-turn / 複数 SubAgent lifecycle 判定を追加する #2222, 実装: worktree-agent-runtime-smoke で claude-gpt の同一 Herdr session multi-turn / 複数 SubAgent lifecycle を fail-closed に証明する #2219, 実装: Codex enforcing harness を quarantine し、advisory session recorder のみ維持して標準 sandbox / approval workflow に戻す #1830, 実装: preflight.run の GH_CONFIG_DIR を command-scoped に伝播する #2403, or PR fix: preserve GH_CONFIG_DIR for bare preflight.run #2407 as anything other than related/historical references.
- Any change to PR fix: preserve GH_CONFIG_DIR for bare preflight.run #2407 or 実装: preflight.run の GH_CONFIG_DIR を command-scoped に伝播する #2403 scope; this remains a standalone follow-up and 1 Issue = 1 PR.
- A policy engine, peer registry, transcript inspection, socket crawler, account-level disable, OS sandbox, PreToolUse hook, global
~/.claudeor Herdr rewrite, new lease/mutex/daemon, or a top-level global hard deny. - Structured execution through Herdr merely for symmetry, human peer live canaries, default-lane exploration/listing/snapshotting/operation/messaging of pre-existing or human Herdr sessions, hostile/self-relaunch defense, or OS/user/VM/account isolation.
Stop Conditions
-
Allowed Paths 外の変更が必要と判明した場合
-
In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
-
新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
-
後続 Phase / 別スコープへの波及が判明した場合
-
nested SubAgent delegation が必要になった場合
-
外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
-
Implementing the default lane requires exploring, listing, snapshotting, operating on, messaging, reading, storing, sending to, or otherwise observing a pre-existing/human Herdr session or human/independent-peer transcript, turn, message, session state, secrets, or global configuration. An explicit
--require-session-baseline-preservationopt-in may perform only its existing before/after baseline observation and boundedpreexisting_herdr_preservedoutcome; if it requires recording or exposing session state, stop. -
The change requires mutation of global Claude/Herdr configuration, arbitrary
--settingspassthrough, or a new global/top-level enforcement mechanism. -
The documented upstream semantics make bare
SendMessage/ListAgentsdeny incompatible with requiredAgent(...)spawn-to-terminal-completion lifecycle; report the exact incompatibility rather than weaken the contract. -
Existing safe canonical-root handling cannot produce bounded wait, safe-point retry, or explicit SKIP/FAIL reason without creating a prohibited coordination mechanism.
-
A real Herdr isolated-session launch is prevented by nested-session policy or equivalent execution-environment constraint; stop runtime verification with SKIP exit 77 and a bounded reason code, and do not treat SKIP as PASS.
References
- Claude Code cross-session messaging: https://code.claude.com/docs/en/cross-session-messaging
- Claude Code permissions: https://code.claude.com/docs/en/permissions
- Claude Code settings: https://code.claude.com/docs/en/settings
- Herdr concepts: https://herdr.dev/docs/concepts/
- Herdr CLI reference: https://herdr.dev/docs/cli-reference/
- Herdr agent automation: https://herdr.dev/docs/agent-automation/
Source / Dedupe Key
source_kind: owner_approved_human_context_refinement
source_context: "Issue #2437 anchor review refinement on 2026-08-30"
dedupe_key: "follow-up:squne121/loop-protocol:worktree-agent-runtime-smoke:invocation-local-peer-policy-v2"
Activity
squne121 commentedon Aug 30, 2026
結論
Issue #2437 の方向性自体は妥当です。ただし、現状の契約のままなら REQUEST_CHANGES を推奨します。
理由はセキュリティ不足ではありません。むしろ逆で、実際に起きた事故より広い「隔離の証明」を runtime-smoke harness に背負わせ始めており、#2219 / PR #2222 で既に膨らんだ検証ハーネスをさらに重くする危険があるためです。#2437 は「人間の別タブを触らない」という実用上重要な境界だけを、安価な launch-time policy で閉じるべきです。Issue 自体には現在コメントはありません。
前提確認
PR #2407 で実際に起きたのは、
fix-auto-permission-boundariesなどが SubAgent と誤認されたのではなく、同一マシン上で別作業中の独立 Claude session に coordinator がSendMessageしたことです。loop-protocol-c9、loop-protocol-3d、loop-protocol-91にも handoff を依頼し、一部には idle notification まで設定していました。これは #2437 が解決したい問題として正しいです。一方 Herdr 側は既にかなり強く分離されています。PR #2176 では interactive lane の既存 Herdr 全体 snapshot 前後比較まで実装済みで、現行 runner も structured は直接 subprocess、interactive は独立 named Herdr session という構成です。Herdr 公式仕様でも named session は panes・socket・persisted runtime state が別 namespace であり、
agent.promptやpane.send_keysのような強い操作面はその session 内にあります。したがって、ここをさらに強化する必要性は低いです。 ([Herdr]1)さらに #2219 / PR #2222 では、multi-turn、複数 SubAgent exact lifecycle pairing、hook sink、nonce/staleness、cleanup、forbidden marker などが追加され、当時すでに runtime-smoke 関連 178 tests PASS まで拡張されています。#2437 で同じ方向の「証拠強度競争」を続けるのは避けた方がよいです。
敵対的レビュー findings
P0 — 実事故の主体と、強制境界を入れる対象がずれています。 fix: preserve GH_CONFIG_DIR for bare preflight.run #2407 で他 session に送信したのは runtime-smoke の子 process ではなく、それを実行していた coordinator 側です。実装: worktree runtime smoke の Claude peer messaging を invocation-local に無効化する #2437 Scope B/C で smoke child に
SendMessage/ListAgentsdeny を掛けるのは正しいものの、これだけでは同じ coordinator が再び「canonical root を空けて」と別タブへ送ることまでは防げません。ここを完全に強制しようとして top-level Claude Code 全体に deny を掛けると、通常の SubAgent/agent-team 利用まで巻き込みます。したがって Goal は「runtime-smoke child の deterministic isolation」に狭め、coordinator については workflow rule として『独立 peer を verification dependency にしない』までに留めるのが妥当です。事故全体を cryptographic/security boundary 的に閉じる Issue にしない方がよいです。P0 — AC3 の「既に動いている independent Claude session を相手にする negative live canary」は削除すべきです。 守りたい人間セッションが存在することをテスト前提にし、しかも「送信されなかったこと」を証明するためにその peer の turn/transcript を観測し始めれば、本末転倒です。CI/ローカル環境でも nondeterministic になります。Claude 公式では bare deny の
SendMessage/ListAgentsは tool 自体を model context から除外し、deny は ask/allow より優先され、Claude Code client が enforcement します。したがって、生成 settings の unit test + 実 process で tool が unavailable/denied であることの canary で十分です。人間の既存 peer は一切テスト対象にしないのがよいです。([Claude]2)P1 — 「caller が絶対に解除できない」「deterministic isolation」という表現は security boundary としては強すぎます。 Claude Code の settings は running session 中にも hot reload され、
permissionsも対象です。Anthropic の issue tracker にも、local config は hostile--dangerously-skip-permissionsagent に対する完全な security boundary ではないという未解決報告があります。([Claude]3) ただし今回の用途では、そこを解決する必要はありません。現行 native smoke は既に harness-owned inline--settingsを process-local overlay として持ち、Claude-GPT は caller の--settingsを拒否して launcher-owned settings を生成しています。 AC は「harness が起動した process の initial/effective invocation policy を caller prompt や公開 CLI input から弱められない」程度へ狭めるべきです。self-relaunch、OS sandbox、account-level isolation まで追わない方がこのプロジェクトに合っています。P1 —
SendMessagedeny は cross-session だけを止める機能ではありません。 Anthropic 公式 docs は、同じSendMessageが independent session、SubAgent、agent-team teammate に使われるため、bare deny すると SubAgent への message も消えると明記しています。([Claude]4) したがって AC4 は「SubAgent lifecycle が維持される」では広すぎます。「Agent(...)spawn → terminal completion の観測は維持される。ただし smoke process 内での SubAgent への追加SendMessage/ resume coordination は利用不可でよい」と明文化してください。現在の smoke が要求する lifecycle はこれで足ります。将来SendMessageが本当に必要になったときだけ、より細粒度な境界を別途検討すべきです。P1 — AC8 の evidence 名が「設定した」と「実際に観測した」を混同しています。
claude_peer_inbound_refused=trueは、実際に controlled sender から送って drop を観測しない限り「refuse が設定された」証拠でしかありません。逆にそこを live peer で証明しようとすると AC3 の過剰テストに戻ります。peer_policy_configured、outbound_peer_tools_absent、cross_session_inbound_configured_refuseのように、config evidence と behavioral evidence を分離した方が正確です。Herdr のpreexisting_herdr_preservedは既存 snapshot で実観測できるため、そのままで構いません。P2 — version/platform compatibility harness は作らない方がよいです。 Cross-session messaging は Claude Code v2.1.224+、macOS/Linux/WSL2 で提供され、native Windows では提供されません。([Claude]4) 対応外 runtime のために大量の branching を追加するより、「対応 runtime では policy を検証、feature unavailable なら明示 SKIP」に留めるべきです。WSL2 が主要環境なら十分です。
P2 — canonical-root contention の lease/mutex 新設まで 実装: worktree runtime smoke の Claude peer messaging を invocation-local に無効化する #2437 に入れない方がよいです。 「peer に main root を空けろと SendMessage しない」というルールだけ必要です。busy なら bounded wait、SKIP/FAIL with reason、あるいは安全な既存 preflight mechanism に戻すだけで足ります。新しい repository coordination protocol を作ると Issue が別物になります。
最小実装案
現行コードには、ちょうど良い injection point が既にあります。native structured lane は
_CLAUDE_SPAWN_HOOK_OBSERVABILITY_SETTINGS_JSONを inline--settingsで追加し、Claude-GPT はCLAUDE_GPT_RUNTIME_SMOKE_HOOKSという固定値チャネルを launcher-owned settings に変換しています。ここにだけ、
{ "crossSessionInbound": "refuse", "permissions": { "deny": ["SendMessage", "ListAgents"] } }を追加するのが最も小さい変更です。これは Anthropic が公式に案内している cross-session off の組み合わせそのものです。
crossSessionInbound: refuseは inbound を drop し、bare deny は outbound/listing tool を model context から外します。なお project/local により厳しい値があればそれも維持され、permissions は scopes 間で merge されます。([Claude]4)native interactive lane は現在 Herdr の
agent startに追加 Claude args を渡す余地があるので、同じ harness-owned settings をherdr agent start ... -- --settings <fixed-json>として渡す。Claude-GPT interactive は caller--settingsを通さず、既存 launcher の smoke-only fixed settings generation に同じ3項目を足す。この程度で十分です。新しい policy engine、peer registry、socket inspection、account-level disable、PreToolUse hook は不要です。テストも、generated settings の exact test、native structured/interactive argv、Claude-GPT generated settings、caller override poison test、既存
--require-min-subagentslifecycle regression の5系統程度でよいです。AC3 の「既存 human peer を用意して本当に送信されないことを確認」は merge gate から外してください。Issue #2437 をどう直すか
私なら Issue を閉じたり分割したりはせず、そのまま refinement して実装します。ただし Goal/AC の表現を次のように変更します。
「人間・peer から完全に security-isolate する」ではなく、**「runtime-smoke invocation が Claude native peer messaging を使用せず、既存 Herdr namespace に触れず、通常の
Agentspawn/completion を妨げない」**を destination にします。AC3 は pre-existing independent session negative canary を削除し、harness-owned settings / tool-surface canary に変更。AC4 は「SubAgent messaging」ではなく「Agent spawn/completion」に限定。AC8 は observed と configured を区別。そして Scope A の coordinator 禁止事項は workflow guidance として残すものの、そこへ新しい enforcing hook を導入しない、という形です。
この方針はリポジトリ自身の #1830 で採用した「通常 workflow を阻害する enforcing harness を quarantine し、観測は fail-open / advisory に寄せる」という設計判断とも整合します。
推奨判定は
needs-fix / REQUEST_CHANGES。ただし修正量は小さくできます。crossSessionInbound + 2 tool denyという Claude Code 本来の機能を invocation-local に適用し、既存 Herdr isolation と SubAgent lifecycle regression を再利用するだけに留めるのが、品質と作業性のバランスが最も良いです。セキュリティハーネスとして高度化する必要はありません。必要なら、次にこのレビューを反映した Issue #2437 の refinement 用 Claude-GPT / Claude Code 作業プロンプトまで、実装方針を固定して作れます。
squne121 commentedon Aug 30, 2026
推奨は、Issue #2437 を分割・クローズせず、アンカーコメントを owner-authoritative な human context として in-place refinement することです。現行
issue-refinement-loopは loop iteration の承認を既定で要求せず、human-context anchor から trusted contract update に進む正規経路も持っています。途中のneeds-fixやissue_editor_requiredは、人間へ戻さず既存 consumer に流すべきです。アンカーコメントの主張は概ね採用でよいですが、1点だけ最新仕様に合わせて補正すべきです。Claude Code の現行公式ドキュメントでは cross-session messaging は macOS/Linux/WSL2 で v2.1.224+、native Windows でも v2.1.234+ とされています。したがって「native Windows では利用不可」というコメント中の記述は、そのまま Issue に固定しない方がよいです。公式仕様は
crossSessionInbound: "refuse"とSendMessage/ListAgentsdeny を off 手段として明記し、SendMessagedeny が SubAgent/agent-team messaging も消す点も明記しています。([Claude]1)以下の対象に対して
issue-refinement-loopを実行してください。対象 repository:
squne121/loop-protocol対象 Issue:
#2437human-context anchor:
Issue comment ID
5467989616これは人間による明示的な実行指示です。
また、上記 anchor comment は repository owner が Issue #2437 の semantic direction を具体的に reframe するために投稿した human context として扱ってください。
目的は Issue #2437 の refinement を、人間の追加承認を要求せず、terminal approve / implementation-ready になるまで bounded に完遂すること です。
最重要ルール
issue-refinement-loopの canonical procedure と command registry を SSOT として実行する。needs-fixは残り iteration がある限り自動継続する。human_judgment_requiredとして人間へ質問し直さない。canonical human-context lane
anchor URL/ID を agent report や unlabeled anchor として扱わないこと。
canonical main root / default branch から、current repository の
issue-refinement-loopが定義するpreflight.run.with_human_contextcontract_update.run.with_human_contextの正規 profile を使用する。
コマンド文字列を記憶や推測で再構築せず、current main の command registry / skill を読んで exact invocation を使うこと。
preflight.run.with_human_contextが trusted contract patch plan を生成した場合は、その plan を canonical consumer に渡して contract update を実行する。NEXT_ACTION: issue_editor_requiredの場合:issue-editor/ controlled Issue rewrite lane へ自動 handoff する。apply_deterministic_repair/apply_deterministic_structural_repairが返った場合も、人間確認を挟まず canonical consumer で適用する。anchor comment の semantic direction
anchor comment の
REQUEST_CHANGES / needs-fixを反映する。Issue #2437 は閉じたり分割したりせず、そのまま refinement して implementation-ready にする。
特に以下を Issue contract に反映すること。
1. Goal を実事故に合わせて狭める
「人間・peer session から完全な security isolation を証明する」ことを destination にしない。
destination は概ね次の意味にする:
worktree-agent-runtime-smokeが起動した runtime-smoke invocation が Claude native peer messaging を使用しない。Agent(...)spawn → terminal completion を阻害しない。coordinator/top-level workflow 側については、
という workflow guidance を維持する。
ただし、そのためだけに top-level Claude 全体を hard-deny する新 enforcement hook / policy engine を追加する契約にはしない。
2. AC3 の live human-peer canary を削除する
pre-existing independent Claude session、特に人間が実際に操作中の session を negative canary の相手にしてはならない。
以下の組み合わせへ変更する:
SendMessage/ListAgentsが absent / denied であることを確認する controlled canary「他 session に送信されなかったことを確認するために、他 session を調べる」という循環した検証設計を作らない。
3. absolute security-boundary claim を弱める
以下のような絶対表現は避ける:
今回保証するのは、
harness が起動する process の initial/effective invocation policy が、caller prompt や smoke runner が公開している CLI input によって弱められないこと
程度に限定する。
self-relaunch、OS-level sandbox、別 Unix user、VM、account-level isolation 等まで Issue #2437 に持ち込まない。
4.
SendMessagedeny と SubAgent の関係を正確にするcurrent official Claude Code docs を再確認すること。
SendMessageは independent peer session だけではなく、SubAgent / agent-team teammate messaging にも使われるため、bare deny するとそれらへの追加 messaging も使用不能になる。したがって AC4 は、
Agent(...)spawnが維持されることを要求する。
一方で、
SendMessageSendMessageまで維持するとは要求しない。
現行 runtime smoke にそれらが不要なら新しい細粒度 boundary を発明しない。
5. evidence の configured / observed を分離する
claude_peer_inbound_refused=trueのような、実際に peer から送信していないと behavioral proof にならない名前を避ける。例として以下のように分離する:
peer_policy_configuredcross_session_inbound_configured_refuseoutbound_peer_tools_absentagent_spawn_completion_observedherdr_namespace_isolatedpreexisting_herdr_preserved実際に観測したものと、settings に設定したことだけを示す evidence を混同しない。
human peer へ controlled sender を向けて inbound refusal を実証する必要はない。
6. platform/version 記述は現在の公式仕様で修正する
anchor comment 自体の技術的意図は authority として尊重するが、外部仕様に関する factual claim は現在の公式ドキュメントで更新する。
特に現時点の Claude Code 公式 docs では cross-session messaging は:
とされている。
したがって「native Windows では unavailable」と固定しない。
Issue #2437 では巨大な version/platform compatibility harness を作らず、
程度にする。
今回の主要環境である WSL2 の正常系を複雑化させない。
7. canonical-root coordination protocol を新設しない
Issue #2437 のために新しい lease/mutex/peer registry/coordination daemon 等を作る契約にしない。
canonical root が他作業で使用中の場合は、
のいずれかにする。
独立した Claude session に
「main root を空けて」
「handoff して」
「終わったら通知して」
等を
SendMessageしてはいけない。最小実装方針として Issue に残す内容
current main の実コードを確認し、まだ成立している場合に限り、以下を implementation guidance として残す。
native structured / interactive runtime-smoke の harness-owned settings に:
crossSessionInbound: "refuse"permissions deny:
SendMessageListAgentsを invocation-local に設定する。
Claude-GPT は arbitrary caller
--settingspassthrough を再開せず、既存 launcher-owned runtime-smoke settings/profile mechanism を narrow に拡張する。新しい以下の仕組みは作らない:
~/.claude/ Herdr configuration rewriteただし current main の実装調査により injection point が既に変わっている場合は、現在の code evidence を優先して Issue wording を修正すること。
Herdr boundary
Herdr については current implementation と公式 docs を確認する。
既存設計が現在も:
HERDR_SESSION/HERDR_SOCKET_PATH等を stripとなっているなら、その設計を再利用する。
symmetry だけを理由に structured lane を Herdr 経由へ変更しない。
サブエージェント
この refinement ではサブエージェントを積極的に使用すること。
最低限、必要に応じて:
へ分担する。
重要:
Agent(...)SubAgent のみ使用する。SendMessage/ListAgentsで独立 Claude session を探したり連絡したりしない。特に以下のような既存の人間/peer session 名が見えても、一切操作しない:
fix-auto-permission-boundariesloop-protocol-c9loop-protocol-3dloop-protocol-91それらは SubAgent ではない。
repository evidence
Issue #2437 本文だけで判断しない。
少なくとも関連する:
worktree-agent-runtime-smokerun_worktree_agent_runtime_smoke.pyを current main で確認する。
関連 PR/Issue の historical design は参考にするが、current main の code と current Issue state を優先する。
Web research
外部仕様に依存する claim は現在の一次資料で検証する。
優先:
ブログや二次情報より公式資料を優先する。
公式仕様と anchor comment の factual statement が食い違う場合:
する。
仕様確認から新しい security-hardening project を発明しない。
許可
以下はこの依頼で明示的に許可する。
これらについて逐一人間の確認を求めない。
この authorization は Claude Code 自身の runtime permission/security configuration を無条件に弱体化する指示ではない。
user-global settings の変更や
dangerously-skip系設定の新規導入によって解決しないこと。停止条件
以下の場合だけ停止して、具体的 evidence と blocker を報告する。
以下は停止理由にしてはいけない:
needs-fixissue_editor_requiredcompletion condition
以下を満たすまで refinement を続ける。
Agent(...)spawn/completion とSendMessagedeny の関係が正確である。approve相当になる。final reviewer が
needs-fixを返し、iteration budget が残っている場合は自動 rewrite → re-review を継続する。最終報告
完了時だけ簡潔に以下を報告する。
途中で人間の追加承認を取りに戻らず、canonical
issue-refinement-loopを最後まで進めてください。このプロンプトで特に重要なのは、human-context consumer を正しく通すことと、別 Herdr/Claude session をサブエージェント扱いしないことです。Issue #2437 の現行本文は live independent-peer canary や強い isolation claim まで要求していますが、アンカーコメントはそこを明確に縮小するよう指示しています。
また、
SendMessagedeny は SubAgent messaging まで除去するため、refinement 後の AC は「SubAgent communication 全般を維持」ではなくAgentspawn → terminal completion を維持とするのが適切です。(Claude)[-]実装: worktree runtime smoke を人間 Herdr / Claude peer session から fail-closed に分離する[/-][+]実装: worktree runtime smoke の Claude peer messaging を invocation-local に無効化する[/+]squne121 commentedon Aug 30, 2026
issue-refinement-loop: approved
CONTRACT_REVIEW_ONCE_RESULT_V1.status: go)sha256:c8c02e1901a0d808009af4662d756a4df2d240a3578ba1f752ab063af93e5367impl-review-loophandoff was started.squne121 commentedon Aug 30, 2026
推奨アクションは、再 refinement ではなく、そのまま
impl-review-loopを開始することです。Issue #2437 はすでにissue-refinement-loop: approved、CONTRACT_REVIEW_ONCE_RESULT_V1.status: goまで到達しており、実装自体はまだ開始されていません。 また現行 Issue は runtime verification をimmediateとし、利用不能環境では reason code 付き SKIP を要求しています。一点だけ、現在の Claude Code 公式ドキュメントでは cross-session messaging は macOS/Linux(WSL2含む)向けで、native Windows は unavailable とされています。Issue に残っている Windows の version 記述より現在の一次資料を優先し、Windows向け互換ハーネスを増やさず feature-unavailable SKIP に落とすのが妥当です。また
SendMessagedeny は SubAgent/agent-team messaging にも影響するため、維持対象は Issue の契約どおりAgent(...)spawn → terminal completion です。([Claude]1)以下を Claude-GPT にそのまま渡せます。
以下の対象に対して、current repository の canonical
impl-review-loopを実行してください。対象 repository:
https://github.com/squne121/loop-protocol対象 Issue:
https://github.com/squne121/loop-protocol/issues/2437目的は、Issue #2437 を 実装 → 検証 → PR 作成 → 独立 PR review → REQUEST_CHANGES 修正 → current-head 再検証 / 再レビューまで自律的に反復し、実際の merge を行う直前の merge-ready 状態まで、人間の途中承認を要求せず進めることです。
Issue #2437 はすでに
issue-refinement-loopで finalapprove/ implementation-ready になっています。refinement を最初からやり直すことを目的にせず、currentimpl-review-loopの Root-Owned Synchronous Entry Transition が要求する fresh contract review / live readback は canonical procedure の一部として実行してください。最重要方針
.claude/skills/impl-review-loop/SKILL.mdとそのsteps/**、implement-issue、open-pr、pr-review-judge、runtime verification policy、command registry を current main から読み、それらを SSOT としてください。コマンドや手順を記憶から再構築せず、current repository に存在する canonical executor / script / skill を使用してください。
Root-Owned Synchronous Entry Transition が要求する場合は、同一 continuous invocation 内で、
capability preflight
→ live Issue fetch
→ current-run issue-contract-review
→ live Issue 再取得
→ root entry routing
→ Step 1 起動
まで連続して実行してください。
過去の snapshot、comment、handoff artifact、ledger、body hash 等を authorization token として再利用しないでください。それらは telemetry / evidence としてのみ扱い、live Issue、current worktree、current HEAD、実テスト、CI、PR review を優先してください。
人間承認について
これは repository owner からの明示的な実行・publish authorization です。
以下の通常作業は、このプロンプトで事前承認済みです。逐一「実行してよいですか」「push してよいですか」「PR を作ってよいですか」と確認しないでください。
.claude/worktrees/**配下への Issue 実装: worktree runtime smoke の Claude peer messaging を invocation-local に無効化する #2437 専用 linked worktree 作成・再利用update_branchが必要と判定した場合の安全な branch updateこれらは additional human approval を要求する理由にしないでください。
ただし、この authorization を理由に Claude / Claude-GPT の user-global security settings を弱めたり、
--dangerously-skip-permissions、global allow、global~/.clauderewrite 等を導入してはいけません。明示的に禁止する最終操作
実際の merge は行わないでください。
以下は禁止です。
gh pr merge最終 destination は「merge を実行すればよい状態」で停止することです。
impl-review-loop の反復
canonical loop を以下の意味で最後まで実行してください。
Step 1:
implementation-workerSubAgent にimplement-issueを実行させる。Step 2:
test-runnerSubAgent に current HEAD を独立検証させる。Step 4:
pr-reviewerSubAgent に current HEAD の独立 PR review を実行させる。Step 5:
canonical
route_loop_verdict_v2()等の current routing implementation に従って判定する。REQUEST_CHANGESの場合は人間へ戻らず、blockers をfix_deltaとして Step 1 に戻し、自動修正してください。BEHINDの場合は、canonicalupdate_branchroute が安全に適用可能なら自動実行し、その新 HEAD で Verification と PR Review をやり直してください。reviewed_head_shaが stale の場合は、修正せずに current HEAD で review を再実行してください。CI failure が実装修正可能な failure なら、自動修正 → push → current-head verification → review を続行してください。
単なる
human_review_required: trueという SubAgent の自己申告だけで停止しないでください。currentimpl-review-loopの canonical routing contract に従い、実 blocker を確認してください。iteration budget は、current skill が明示的な入力として許可するなら
max_iterations=5を使用してください。current skill がより厳しい上限を normative に定めている場合はそれを優先してください。サブエージェントの必須利用
この作業ではサブエージェントを使用してください。
最低限、canonical loop が要求する:
implementation-workertest-runnerpr-reviewerを使用してください。
必要なら、read-only の codebase investigator / web researcher 等を追加利用して構いません。
重要な completion rule:
SubAgent の終了を待たずに、結果を推測して先へ進んではいけません。
複数 SubAgent を並列実行して依存関係がない場合も、全員が terminal completion になるまで待ってから統合判断してください。
同一 Claude-GPT root session 内の
Agent(...)SubAgent と、別 Herdr tab / pane / named session / 独立 Claude Code session を混同しないでください。SendMessageや cross-session discovery を使って、既存の独立 Claude session に仕事を依頼してはいけません。特に、この run が作成していない Herdr / Claude session を、
してはいけません。
同一 root session が spawn した SubAgent の completion 取得に current runtime の sanctioned agent-status API が必要な場合は、その run が spawn した agent にのみ限定してください。独立 peer discovery のために使用してはいけません。
Issue #2437 の Stop Conditions に従い、worker 内からさらに nested SubAgent delegation が必要になる設計にはしないでください。root
impl-review-loopが canonical workers を spawn することと、worker が nested delegation することは区別してください。Issue #2437 の実装方針
まず current main の実コードを再確認してください。以下は technical recommendation であり、current code evidence が変化していれば current code を優先してください。
Native Claude structured lane
現在の runner が process-local
--settingsoverlay を持っている場合、その既存 settings generation に最小差分で以下を統合してください。{ "crossSessionInbound": "refuse", "permissions": { "deny": [ "SendMessage", "ListAgents" ] } }既存 SubagentStart / SubagentStop hook observability settings を消してはいけません。
既存 JSON を丸ごと別 policy engine へ置き換えず、harness-owned invocation-local settings として統合してください。
global
.claude/settings*や~/.claudeを変更してはいけません。Native Claude interactive lane
既存の設計:
HERDR_*identity stripを維持してください。
current Herdr CLI が
agent start ... -- <claude args>のような runtime argv pass-through を正式に提供していることを current upstream docs / installed version で確認し、成立する場合は既存agent_extra_args等の injection point を使って、native interactive Claude に同じ fixed--settingsを渡してください。symmetry のためだけに structured lane を Herdr 経由へ変えてはいけません。
Claude-GPT lane
Claude-GPT では arbitrary caller
--settingspassthrough を開放してはいけません。現行
scripts/claude-gpt/launch.shが持つ launcher-owned fixed runtime-smoke settings/profile channel を確認し、その既存 channel を narrow に拡張して、crossSessionInbound: "refuse"SendMessagedenyListAgentsdenyを launcher-owned generated settings に統合してください。
既存
permissions.deny、authorization hooks、runtime-smoke observability hooks を上書き・欠落させないよう merge してください。caller が
--settings、--dangerously-skip-permissions、--permission-mode bypassPermissions等で policy を弱められない現在の性質を維持してください。新しい arbitrary settings passthrough API を追加しないでください。
テスト方針
少なくとも Issue #2437 の AC に対応して以下を検証してください。
SendMessage/ListAgentsが controlled spawned process で absent または denied になる canaryAgent(...)spawn → terminal completion が観測できる lifecycle regressionHERDR_*stripIssue が指定する evidence names:
peer_policy_configuredcross_session_inbound_configured_refuseoutbound_peer_tools_absentagent_spawn_completion_observedherdr_namespace_isolatedpreexisting_herdr_preservedの意味を勝手に強化しないでください。
特に
cross_session_inbound_configured_refuseは configuration evidence であり、human peer から実送信して behavioral proof を取るものではありません。runtime verification
Issue #2437 の
Runtime Verification Applicability: immediateを遵守してください。Issue 本文に列挙された focused pytest と repository-wide verification を実行してください。
少なくとも current Issue の Verification Commands として指定されている:
scripts/claude-gpt/test_launch_transport_policy.pypnpm typecheckpnpm lintpnpm testpnpm buildを canonical command shape で実行してください。
mock-only result を runtime PASS にしないでください。
real Claude / Herdr runtime が利用可能なら live runtime-smoke を実行し、Issue の allowlisted evidence のみ保存してください。
runtime / auth / cross-session feature / nested-Herdr execution constraint により実 runtime が利用不能な場合は、Issue の既存 contract に従い exit 77 + bounded reason code の SKIP としてください。
SKIP を PASS に読み替えてはいけません。
upstream specification の扱い
実装開始時に Claude Code の current official documentation を fresh に確認してください。
2026-08-30 時点の公式 documentation では cross-session messaging は macOS / Linux(WSL2 を含む)で提供され、native Windows では unavailable とされています。
Issue #2437 本文に残る version/platform 文言より current official upstream fact を優先してください。
ただし、この差異を理由に大きな compatibility harness や別 security project を作らないでください。
native Windows で feature が unavailable なら、Issue 自身の既存 fallback semantics に従って bounded feature-unavailable SKIP としてください。
WSL2 の正常経路を複雑化させないでください。
また current official docs で、bare
SendMessagedeny が independent-session messaging だけでなく SubAgent / agent-team messaging も除去することを確認してください。したがって維持すべき契約は、
Agent(...)spawn → SubAgent terminal completion → lifecycle evidenceです。
spawn 後の追加
SendMessage/ resume coordination を維持するために、新しい細粒度 policy mechanism を発明しないでください。実装しないもの
以下は Issue #2437 のために追加しないでください。
canonical root が busy の場合も、別 Claude session に「root を空けて」「handoff して」「終わったら通知して」と message しないでください。
existing safe mechanism、bounded wait、safe-point retry、または explicit SKIP/FAIL reason を使用してください。
Allowed Paths
live Issue #2437 の current Allowed Paths を再取得し、それを authority としてください。
Allowed Paths 外を編集しないでください。
現在の Issue contract と current repository evidenceから Allowed Paths 外の production change が本当に必要だと判明した場合、勝手に scope を拡大しないでください。
停止条件
途中承認を求めるのは routine work ではなく、以下のような真の hard blocker に限定してください。
単なる「念のため確認したい」は停止理由にしないでください。
PR create、push、コメント、current-head CI 再実行、REQUEST_CHANGES 修正、safe branch update、review 再実行はすでに許可されています。
merge直前の completion condition
以下が成立するまで、自動ループを続けてください。
Closes #2437等の canonical linkage を持つAPPROVEimpl-review-loopの approved 条件(CLEAN/HAS_HOOKS等)を満たすここまで到達したら、merge はせず停止してください。
最終報告
最終報告には最低限以下を含めてください。
IMPL_REVIEW_LOOP_RESULT_V1または current canonical equivalent途中経過で人間へ承認を取りに戻らず、canonical
impl-review-loopの safe automatic routes を使い切ってから最終結果を返してください。この版では、worktree作成・実装・commit・push・PR作成/更新・CI確認・レビュー差し戻し修正・safe branch update・再レビューまで事前許可し、
mergeだけを明確な境界として残しています。現行impl-review-loop自体もAPPROVE + blockersなし + live mergeabilityまで到達したところで PR を人間の merge 判断に渡す設計なので、この停止位置と整合します。squne121 commentedon Aug 30, 2026
root-owned entry router audit
route: invoke_impl_review_loop
reason: fresh_review_go_live_equality
fix: classify nested Herdr runtime smoke as skip (#2437)
fix: #2437 runtime smoke skill 日本語文言を整備
fix: #2437 Claude Code reference の日本語文言を整備
fix: #2437 runtime ops 文書の日本語文言を整備
fix: #2437 runtime ops 文書の日本語文言を整備
squne121 commentedon Aug 31, 2026
推奨は、#2437 の実装を作り直すのではなく、まず Issue contract の
runtime_only指定が適切かを再精査し、contract-only で解消できればそのまま PR #2454 のimpl-review-loopを再開することです。adjudicate_vc_result.pyはもともと fail-closed な VC routing authority として導入されたため、今回だけ通す special-case を先に追加するのは避けるべきです。以下をそのまま Claude-GPT に渡せます。
対象 repository:
https://github.com/squne121/loop-protocol対象 Issue:
https://github.com/squne121/loop-protocol/issues/2437対象 PR:
https://github.com/squne121/loop-protocol/pull/2454目的
Issue #2437 / PR #2454 の
impl-review-loopが canonical Step 4 VC gate で停止している原因を解消し、可能なら PR #2454 を 実際には merge せず、human が merge できる直前の merge-ready 状態まで進めてください。人間への途中承認は不要です。
ただし、ログをそのまま current truth とみなさず、最初に live GitHub state、current main、current PR HEAD、Issue body/comments、CI、review state、repository の current canonical skill/script/registry を再取得してください。
現在観測されている停止理由は以下です。
preflight-scope: runtime_onlyにより fresh contract review が AC8 をclassification: skipped / scope_class: runtime_onlyとする。adjudicate_vc_result.pyがこれをunsupported_baseline_classification:AC8として fail-closed にし、Step 4 のpr-reviewer起動を禁止している。この仮説を必ず current main / current HEAD で再現・検証してから変更してください。
最重要方針
最初から
adjudicate_vc_result.pyを緩めないでください。優先順位は次です。
impl-review-loopinfrastructure 側の gap として別 Issue 化する。特に、Issue #2437 の最初の Verification Command は実体として pytest の focused test command です。
preflight-scope: runtime_onlyが本当に正しいかを検証してください。候補として、
baseline-expect: fail等、repository が既に持つ canonical baseline semantics を使うなどを検討してください。
ただし、候補を推測で採用しないでください。
current main 上での baseline behavior と PR current HEAD 上での behavior を実際に確認し、current command registry / contract-review semantics に沿って選定してください。
絶対に維持する意味論
Issue contract を修正する場合でも以下は弱めないでください。
decision: immediateAgent(...)spawn → terminal completion evidencecrossSessionInbound: "refuse"SendMessage/ListAgentsdenyつまり、Step 2 の static VC classification を正しくするために real runtime requirement を削ってはなりません。
Phase 0 — canonical preflight / live state
current main / default branch から開始してください。
コマンドや手順を記憶から再構築しないでください。
以下を current repository から読み、SSOT としてください。
.claude/skills/impl-review-loop/**.claude/skills/issue-refinement-loop/**.claude/skills/issue-contract-review/**adjudicate_vc_result.pyadjudicate_vc_result.pyの runtime_only / pr_review_only / skipped classification testslive で以下も取得してください。
stale transcript の SHA や以前の判定を authorization として再利用しないでください。
Phase 1 — サブエージェントによる敵対的 root-cause review
サブエージェントを必ず使用してください。
少なくとも以下の独立した観点を分担してください。
SubAgent A — contract semantics reviewer
read-only で以下を調査:
preflight-scope: runtime_onlyの canonical semanticsSubAgent B — loop infrastructure reviewer
read-only で以下を調査:
adjudicate_vc_result.pySubAgent C — adversarial reviewer
A/B のどちらにも依存せず、
を敵対的にレビューしてください。
サブエージェント完了条件
サブエージェントを spawn しただけで先へ進まないでください。
各サブエージェントが terminal completion し、final result を返すまで待ってください。
repository-defined canonical Agent/SubAgent mechanism を使用してください。
独立した別 Claude Code / Claude-GPT / Herdr session へ
SendMessageして作業を依頼してはいけません。人間が操作中の Herdr session、他タブ、他 Claude session を一覧・操作・通知・停止対象にしてはいけません。
in-session
Agent(...)/ repository-defined SubAgent mechanism のみを使用してください。サブエージェント結果が競合する場合は、root が証拠を比較して決定してください。単なる意見の相違を human escalation にしないでください。
Phase 2A — 推奨経路: Issue contract-only refinement
root-cause review の結果、
preflight-scope: runtime_onlyが static pytest Verification Command に対する誤った classification metadata であり、contract-only で正確に表現可能だと判断した場合、この経路を優先してください。current repository の canonical
issue-refinement-loopを使用してください。手順を推測せず、current main の command registry / skill が定義する exact profile / executor を使用してください。
必要なら human-context route / contract update consumer を使用してください。
許可
以下は人間承認なしで実行して構いません。
ただし contract refinement は blocker 解消だけを目的とし、Goal/Outcome/AC の実質的な要求を弱めないでください。
新しい Verification Command metadata を選択するときは、
を証拠として示してください。
Issue body を変更したら body SHA drift を当然のものとして扱い、fresh current-run contract review からやり直してください。
Phase 2B — fallback: loop infrastructure gap
contract-only refinement が以下のいずれかに該当する場合は採用しないでください。
その場合は loop infrastructure defect と判断してください。
まず既存 Issue/PR を検索し、重複 Issue を作らないでください。
特に historical Issue #1115 と、その後の
adjudicate_vc_result.py変更履歴・関連 Issue を確認してください。既存の open Issue が正しくこの gap を扱っているなら、その Issue を使用してください。
存在しない場合は、新しい standalone implementation Issue を人間承認なしで作成して構いません。
Issue の destination は概ね以下です。
設計時には少なくとも以下を固定してください。
AC8/#2437判定を作らない新 Issue を作った場合は current canonical
issue-refinement-loopで contract を精緻化し、その後 canonicalimpl-review-loopで実装してください。1 Issue = 1 PR を維持してください。
作業権限
この依頼は、目的達成に必要な 安全・可逆・通常の repository/GitHub 操作を事前承認します。
人間へ個別承認を取りに戻る必要はありません。
以下を許可します。
Read / investigation
--help/ version / capability確認Repository changes
git addGitHub mutations
Verification
permission/control-plane の一時的失敗は即 human escalation にせず、
を先に使い切ってください。
禁止事項 / 本当の停止条件
以下のみ停止条件としてください。
~/.claude/ global Herdr configuration の変更が必要「念のため確認したい」「Issue body が変わる」「PR comment を投稿する」「push する」「CI を再実行する」は停止理由ではありません。
Phase 3 — #2437 / PR #2454 の impl-review-loop 再開
contract blocker が解消したら、current repository の canonical
impl-review-loopを PR #2454 / Issue #2437 に対して fresh state から再開してください。古い VC artifact、古い contract body SHA、古い PR head SHA を再利用しないでください。
以下を current head に bind し直してください。
Step 2 では test-runner SubAgent を使用してください。
test-runner が terminal completion し final read-only report を返すまで待ってください。
その report と current-head binding を canonical adapter/adjudicator で処理してください。
Step 4 gate が
blocking == falseになった場合のみ pr-reviewer SubAgent を起動してください。pr-reviewer についても terminal completion + final result の両方を確認してください。
REQUEST_CHANGES が出た場合:
を canonical iteration budget 内で繰り返してください。
途中で human approval を要求しないでください。
CI / branch drift
main が進んで PR が BEHIND になった場合は、current repository が定義する canonical safe branch update mechanism を使用してください。
raw な独自 merge/update 手順を作らないでください。
update 後は HEAD が変わるため、
の stale 判定を行い、必要なものを current HEAD に対して再取得してください。
stale green check / stale approval を merge-ready evidence に使わないでください。
merge禁止
PR #2454 を merge しないでください。
Phase 2B で infrastructure fix PR を作った場合も、明示的な別指示がない限り実際の merge はしないでください。
contract-only refinement で解消できた場合の最終目標は、
PR #2454 = human が merge ボタンを押せる直前です。
infrastructure PR が必要で、その merge が #2454 再開の prerequisite になる場合は、無理に #2454 を merge-ready と偽らず、
を明示して停止してください。
最終報告
最終報告には最低限以下を含めてください。
VC_ADJUDICATION_RESULT_V1の final statusIMPL_REVIEW_LOOP_RESULT_V1または current canonical equivalentmerge-ready なら最後に明確に、
PR #2454 は、人間が merge を実行できる直前の状態です。実際の merge は実行していません。と報告してください。
最も重要なのは、gate を通すために evidence semantics を弱めるのではなく、誤った contract classification なら contract を正し、本当に framework gap なら framework を一般解として直すことです。
このプロンプトでは、contract 修正で済む場合に余計な基盤 Issue を増やさず、それで済まない場合だけ別 Issue/PR に分離するようにしています。特に「
runtime_onlyを adjudicator が拒否するから受理するよう変更」という短絡を防ぎつつ、サブエージェントの完了待ちまで明示しています。squne121 commentedon Aug 31, 2026
現状のボトルネックは実装そのものではなく、PR #2454 のレビュー指摘を PR 本文へ反映し、fresh current-head evidence で再検証して pr-reviewer を再実行することです。特に reviewer は「AC1–AC8 の明示」「current-head runtime evidence 更新」「interactive lane の exit 77 を PASS にせず SKIP のまま扱うこと」を要求しています。
また、以前のプロンプトには commit・non-force push・current-head evidence・pr-reviewer 再実行などの事前承認が含まれていたにもかかわらず、delegated PR body update が external write として拒否されています。今回は 「PR #2454 本文更新そのものを直接承認する」 と対象を明記するのが重要です。
Issue #2437 / PR #2454 の作業を、現在地点から継続してください。
対象:
目的は Issue #2437 の impl-review-loop を完遂し、PR #2454 を人間がそのまま merge 判断できる merge-ready 状態まで持っていくことです。
実際の merge は実行しないでください。
重要: このメッセージによる明示的なユーザー承認
このメッセージは、Issue #2437 / PR #2454 を merge-ready にするために必要な以下の repository / GitHub external writes を、ユーザー本人が明示的に承認するものです。
人間への追加確認なしで実行して構いません。
前回
implementation-workerが PR #2454 本文更新を[External System Writes]として拒否した点について、今回のこのメッセージを「PR #2454 本文更新に対する direct user authorization」として扱ってください。子 SubAgent 側に authorization が伝播せず、同じ external-write classifier によって delegated write のみ拒否される場合、それだけを理由に再び人間へ承認を要求しないでください。
その場合は、
のどちらかで継続してください。
raw な独自 GitHub mutation を作らず、current repository の skill / wrapper / command registry が mutation 経路を規定している場合は必ずそれを使ってください。
現在地点
以前の transcript の SHA・判定・artifact をそのまま current evidence と見なしてはいけません。
ただし、作業履歴として以下は把握してから current state を再取得してください。
Issue 実装: worktree runtime smoke の Claude peer messaging を invocation-local に無効化する #2437 の実装は既にかなり進んでいる。
PR feat: isolate runtime smoke Claude peer messaging #2454 は既に存在する。
current-head verification / runtime evidence は実行済みだった。
pr-reviewer は直近で
REQUEST_CHANGESを返した。主な指摘は以下だった。
exit 77 / herdr_isolated_session_unavailableは SKIP であり、PASS に変換してはいけないその最小 PR 本文修正を
implementation-workerに委譲したところ、external system write classifier により拒否されて停止した。したがって、ゼロから Issue #2437 を再実装しないでください。
まず current state を取得し、「本当に残っている差分」だけを処理してください。
Step 0: canonical state を再確立する
current repository の SSOT を読み直してください。
少なくとも、
を fresh に取得してください。
stale transcript に記録された SHA、body SHA、command hash、review verdict、CI status を current truth として再利用しないでください。
既存 worktree が current canonical workflow から安全に継続可能なら再利用して構いません。不要な worktree 作り直しは禁止します。
Step 1: reviewer の未解決指摘だけを特定する
current PR review / comments を再取得して、未解決 blocker を列挙してください。
直近の REQUEST_CHANGES が依然 current なら、まず以下を修正してください。
PR 本文
PR #2454 の本文に current implementation と一致する形で AC1–AC8 の達成状況を明記してください。
各 AC について、
が追える状態にしてください。
特に interactive runtime-smoke が execution-environment constraint により
exit 77herdr_isolated_session_unavailableとなる場合は、repository contract に従って SKIP と記録してください。
PASS に書き換えたり、successful runtime execution が観測されたかのように表現してはいけません。
current-head runtime evidence を現在の PR HEAD に bind し直してください。
PR 本文には、古い SHA や古い artifact を current evidence として残さないでください。
既存 Safety Claim Matrix が current implementation と一致しているなら保持・更新してください。
Closes #2437も保持してください。PR reviewer の要求が本文修正だけで満たされるなら、コードを無意味に変更しないでください。
Step 2: 実装変更が本当に必要なら修正する
fresh review / verification からコード上の blocker が判明した場合のみ実装修正してください。
Issue #2437 の現在の contract / Allowed Paths / Required Design References / Verification Commands を authoritative としてください。
Issue body 自体に contract defect があり変更が避けられない場合のみ Issue body を更新してください。
Issue body を変更した場合は body SHA drift を正常なものとして扱い、fresh current-run contract review / preflight からやり直してください。
古い contract evidence を流用しないでください。
Step 3: SubAgent を使用する
この作業では SubAgent を実際に使用してください。
ただし、人間が操作中の Herdr session、別タブ、独立した Claude / Claude-GPT session を探索・一覧・操作・message してはいけません。
@session、cross-sessionSendMessage、独立 peer への coordination を使わないでください。許可されるのは 現在の main session が
Agent(...)で生成する child SubAgent です。推奨構成:
implementation-worker
test-runner または current impl-review-loop が指定する verification agent
pr-reviewer
repository が現在別の canonical agent 名を定義しているならそちらを優先してください。
SubAgent を起動したら terminal completion まで必ず待ってください。
「起動したのでバックグラウンドで待つ」とだけ報告して main session を終了してはいけません。
各 SubAgent の final result を main session が取得してから次のステップへ進んでください。
child agent completion の観測のために post-spawn
SendMessageを要求してはいけません。Step 4: fresh verification
PR 本文または implementation を修正した後、current HEAD を再取得してください。
Issue #2437 の literal Verification Commands を current contract から取得し、canonical runner を使って実行してください。
コマンド文字列を transcript や記憶から復元しないでください。
必要な、
を current-run の値で bind してください。
runtime_onlySKIPexpected_passblockingpr_review_onlyなどは repository の current semantics に従って判定してください。
特に SKIP を PASS に昇格させないでください。
Step 5: CI
non-force push または HEAD change が発生した場合、new HEAD の CI を追跡してください。
required checks が terminal state になるまで確認してください。
失敗した場合は canonical CI log retrieval を使って原因を分類してください。
Issue #2437 / PR #2454 に起因する failure なら修正してください。
unrelated infrastructure failure や flaky failure の場合は、repository の既存 policy に従って bounded rerun / retry / explicit classification を行い、Issue #2437 と無関係な大規模修正に scope expansion しないでください。
Step 6: pr-reviewer
current-head verification が Step 4 の reviewer gate を満たした場合のみ
pr-reviewerSubAgent を起動してください。必ず terminal completion を待ってください。
APPROVE / non-blocking
merge-ready 判定へ進んでください。
REQUEST_CHANGES / blocking
人間へ戻さず、内容を分類してください。
修正可能なら、
implementation-worker
→ verification
→ CI
→ pr-reviewer
を再実行してください。
このループは blocker がなくなるまで継続してください。
PR 本文だけの指摘なら PR 本文だけ直し、不要なコード churn を作らないでください。
merge-ready 判定
少なくとも以下を fresh current state で確認してください。
Closes #2437が適切ここまで達成したら作業完了です。
PR #2454 を実際には merge しないでください。
停止条件
以下の場合のみ人間へ戻してください。
単なる
では停止しないでください。
最終報告
最後に以下を報告してください。
条件を満たした場合は最後に明確に、
MERGE_READY: YESと記載してください。
満たしていない場合は、
MERGE_READY: NOとし、残っている blocker を具体的に列挙してください。
承認待ちで途中停止するのではなく、このプロンプトで承認済みの操作はそのまま実行して、merge-ready または上記停止条件まで canonical loop を完遂してください。
この版では特に、**「child の external-write authorization が通らなければ main session の canonical writer にフォールバックする」**ところまで明記しています。前回と同じ PR 本文更新承認ループに戻るのを防ぐための重要な追加です。
fix: redact absolute paths from runtime evidence (#2437)
fix: avoid default Herdr namespace observation (#2437)
fix: preserve pre-start Herdr SKIP (#2437)
fix: route Claude-GPT interactive smoke policy (#2437)
feat: isolate runtime smoke Claude peer messaging (#2454)