Skip to content

実装: GPT-5.3-Codex-Spark delegation を Claude-GPT / Claude Code 経路から退役させる #2651

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "repository-owned Claude-GPT / Claude Code integration から GPT-5.3-Codex-Spark の選択・delegation 経路を撤去し、明示指定されても実行・silent fallback しない状態にする"
change_kind: code
issue_dedupe_key: "implementation:claude-gpt:retire-gpt-5.3-codex-spark"

Parent Issue

none

Parent Goal Ref

  • Goal: repository-owned Claude-GPT / Claude Code integration から GPT-5.3-Codex-Spark の選択・delegation 経路を撤去し、明示指定されても実行・silent fallback しない状態にする(parent Issue が存在しないため、本 Issue 単独が goal を保持する)
  • Desired Destination: N/A(parent Issue が存在しないため。上記 Goal がそのまま本 Issue の Desired Destination)

Current Validated Scope

  • scripts/claude-gpt/lib.sh から spark-codex custom agent prompt / --agents fragment 生成関数を撤去する
  • scripts/claude-gpt/launch.sh から DELEGATION_AGENT_ID/DELEGATION_MODEL の Spark 値・authorization gate(SPARK_GATE_WRITER_PY_BEGIN/_END マーカー区間、hook wiring への SPARK_GATE_WRITER command 注入を含む)・SPARK_AGENTS_JSON 生成経路を撤去し、通常 SubAgent canary 生成が Spark 定数に依存しない形へ分離する。SPARK_GATE_WRITER_PY_BEGIN/_END マーカーが撤去されると scripts/agent-ops/run_worktree_agent_runtime_smoke.py::extract_spark_gate_writer_source()(launch.sh から gate-writer ソースを抽出する production helper)は常に None を返すようになる。この関数の消費者は source is not None/SPARK_GATE_WRITER hook 注入/agents.keys() == {"spark-codex"} を positive contract として直接検証する既存テスト(下記 Allowed Paths 参照)に加えて、scripts/claude-gpt/tests/test_background_execution_foreground_invariant.py の fixture(同関数を呼び出し source is not None を assert する)も含む。いずれも、ファイルパスを維持したまま「gate-writer ソースが見つからない/hook に注入されない」ことを検証する negative test へ置換する。test_background_execution_foreground_invariant.py については、この extract_spark_gate_writer_source() 依存 fixture assertion のみを置換対象とし、同ファイルが検証する background/foreground-disable invariant ロジック本体・CLAUDE_CODE_DISABLE_BACKGROUND_TASKS/Bash.run_in_background に関わる部分は変更しない(引き続き 実装: Claude-GPT launcher と issue-refinement-loop Step 2 の background+join 契約を整合させる #2652 の scope)。
  • scripts/claude-gpt/workflow_capability_preflight.py から Spark 判定関数(_spark_capability 等)と SPARK_* 定数を撤去し、GitHub認証・AGY・deadline・operation route の shared infrastructure は維持する(wcp.SPARK_*/_spark_capability()/_spark_delegation_capability() を positive contract として直接参照する既存テスト6件も、ファイルパスを維持したまま retired route の内容へ置換する。下記 Allowed Paths 参照)
  • .claude/skills/issue-refinement-loop/scripts/workflow_start_entry.py の LOOP_SPARK_MODE/LOOP_SPARK_FALLBACK(CLI flag 含む)の受理・転送を撤去し、指定時は deterministic な retired rejection にする
  • .claude/skills/issue-refinement-loop/scripts/root_entry_router.py の capability_preflight_result() から spark_mode/spark_fallback パラメータ経路を撤去する
  • 呼び出し契約の維持(重要): workflow_capability_preflight.py::assess() を含む複数の producer は spark_mode/spark_fallback を required keyword-only 引数として持ち、spark_mode=None(Spark 未要求)で呼ぶ既存の ordinary caller が複数存在する(例: scripts/claude-gpt/tests/test_timeout_taxonomy_compat.py、test_runtime_smoke_issue_to_impl.py、scripts/agent-guards/tests/test_capability_artifact_sanitization.py)。これらのキーワード引数シグネチャ自体は撤去しない。撤去対象は spark_mode が non-None のときの Spark-positive 内部判定分岐(_spark_capability()・SPARK_* enum)のみであり、spark_mode=None の呼び出しは既存のまま無変更で動作し続ける。この3ファイルは Allowed Paths に追加しない(変更不要)。一方 root_entry_router.py::capability_preflight_result() と workflow_start_entry.py::run() は、spark_mode/spark_fallback パラメータ自体を撤去する(assess() とは異なる扱い)。これは、両関数の呼び出し元が Allowed Paths 内のファイルに限られ同一 PR 内で一緒に変更されるため、外部の pinned caller が存在しない(assess() の ordinary caller のような Allowed Paths 外の呼び出し元が存在しない)ことによる。
  • scripts/agent-guards/skill_runtime_exec.py の _sanitize_env() から LOOP_SPARK_MODE/LOOP_SPARK_FALLBACK の allowlist 通過を撤去する。この allowlist 通過を positive contract として直接検証する既存テスト(.claude/skills/issue-refinement-loop/scripts/tests/test_skill_runtime_exec_env_allowlist.py、tests/agent_ops/test_control_plane_worktree_bootstrap.py。下記 Allowed Paths 参照)も、ファイルパスを維持したまま「carry-through されない」ことを検証する negative test へ置換する
  • scripts/claude-gpt/runtime_smoke_test.sh の --spark-delegation 認識・専用処理を、黙った fallthrough ではなく明示的な非ゼロ終了(退役エラー)へ置き換える
  • 上記に対応する既存 Spark 関連 test files(下記 Allowed Paths 参照)は、ファイルパスを維持したまま内容を retired route の negative regression test へ置換する(ファイル削除は選ばない。Verification Commands が各ファイルへの直接 uv run pytest <path> 実行を前提とするため)
  • .claude/skills/issue-refinement-loop/SKILL.md の Spark capability request 手順記述を退役済みとして更新する
  • docs/dev/claude-gpt-runtime-prerequisites.md の checks.spark.status(not_required/eligible/fallback_only/...)の説明を、この判定自体が撤去された事実に合わせて更新する
  • docs/dev/agent-skill-boundaries.md の「将来の Spark 設計は claude-gpt-session 上のカスタム SubAgent spark-codex として 実装: 通常 claude-gpt 対話中、明示 @ 指示時だけ GPT-5.3-Codex-Spark SubAgent を起動する #2186 が別途所有する」という記述を、退役済みである事実に合わせて更新する(過去の Manual Spark Agents 撤去に関する historical な記述自体は変更しない)
  • scripts/claude-gpt/preflight.sh のコメント(--workflow-profile 説明部、workflow_capability_preflight.py の JSON 結果を「trusted uv / Spark route capability / GitHub read / GitHub write」の4次元判定と現在時制で説明している箇所)を、Spark 判定撤去済みの事実に合わせてコメントのみ更新する(preflight.sh 自体の実行ロジックは変更しない)

Remaining Parent Gaps

なし(parent Issue が存在しないため)

Outcome

repository-owned Claude-GPT / Claude Code 起動経路から spark-codex / gpt-5.3-codex-spark を選択・dispatch できなくする。

明示指定が残っている場合は、別モデルへ silent fallback せず、retired/unsupported であることが分かる deterministic な拒否にする。

Runtime Verification Applicability

  • decision: immediate
  • reason: 退役拒否(deterministic rejection / 非ゼロ終了)と silent fallback 回避の検証は、launcher / CLI script / workflow capability preflight を実際に subprocess として起動し、exit code・stdout/stderr・生成された --agents JSON を確認することに依存するため、pnpm typecheck/lint/test/build のような静的検証だけでは完結しない。
    applicable_acs: AC3, AC4, AC5, AC7, AC8, AC9, AC10
    execution_environment: worktree ローカルの bash / uv run pytest subprocess 実行。既存 fake subprocess / fixture ベースのテストを使い、外部ネットワークやライブ Spark 認証への依存はない。
    skip_conditions: uv または bash が利用不可の場合は SKIP(exit 77)とし、fallback 実行なしで停止する。
    fallback_policy: フォールバック経由で「成功」した結果は FAIL として扱う。別モデル・別 Agent への dispatch が観測された場合は該当 AC を FAIL とする。
    artifact_requirements: 各 VC(pytest / rg)の実行ログ(stdout・stderr・exit code)を artifacts/ 配下に保存し、PR 本文の ## Runtime Verification Evidence へ inline 引用する。

Background

current main には spark-codex / gpt-5.3-codex-spark を明示的に起動する repository-owned integration が残っている。

確認済みの代表例:

  • scripts/claude-gpt/lib.sh: spark-codex custom agent prompt / definition
  • scripts/claude-gpt/launch.sh: DELEGATION_AGENT_ID = "spark-codex"、DELEGATION_MODEL = "gpt-5.3-codex-spark" と explicit authorization route
  • scripts/claude-gpt/tests/**: Spark availability、model pin、foreground/background invariant、evidence semantics の regression tests
  • scripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_spark_explicit_gate.py: Spark explicit gate の smoke/regression contract

加えて(2026-09-18 refinement で追加確認)、model ID の文字列一致だけでは追跡できない workflow capability route が別途存在する。

  • .claude/skills/issue-refinement-loop/scripts/workflow_start_entry.py は CLI flag または環境変数 LOOP_SPARK_MODE/LOOP_SPARK_FALLBACK を受け取り、root_entry_router.capability_preflight_result() に転送する。
  • scripts/claude-gpt/workflow_capability_preflight.py::_spark_capability() は binary/auth の availability のみを見て eligible/fallback_only(fallback_route: non_spark_agent)/unavailable を返す。これは Spark の退役状態ではなく binary/auth の現在状態を見ているため、launcher 側の spark-codex 定義を削除しても、このロジックは Spark を eligible と判定し続けるか、非 Spark へのfallback を提示し続ける(現状のコードで確認済み: scripts/claude-gpt/workflow_capability_preflight.py:256-278, :405-429)。
  • scripts/agent-guards/skill_runtime_exec.py::_sanitize_env() は command_id == "preflight.run" の場合に限り LOOP_SPARK_MODE/LOOP_SPARK_FALLBACK を子プロセスへ通す allowlist を持つ。
  • scripts/claude-gpt/launch.sh は通常 SubAgent 用 smoke canary の生成でも CLAUDE_GPT_SPARK_AGENT_NAME を canary fragment 生成関数へ渡し、その結果を SPARK_AGENTS_JSON に merge している(launch.sh:1131, :1240-1250)。Spark 定数・JSON 生成を単純削除すると、通常 SubAgent の canary 生成・起動まで巻き込まれる構造になっている。
  • scripts/claude-gpt/runtime_smoke_test.sh は --spark-delegation を専用の pre-scan loop(:48-53)で認識しているが、メインの引数解析loop(:95-140)は未知の引数を黙って shift する catch-all 分岐を持つ(:136-138)。pre-scan の認識だけを削除すると、runtime_smoke_test.sh --spark-delegation が黙って通常 smoke へ fallthrough し、誤って成功する可能性がある(実装コード確認済み、修正時は catch-all に依存せず明示的な非ゼロ終了にする)。

Upstream status

2026-09-17 時点で、OpenAI が gpt-5.3-codex-spark の正式な「廃止」を宣言した一次資料は確認できていない。

一方で、以下の状況を確認している。

したがって本 Issue は upstream の正式な廃止宣言(API lifecycle ドキュメントへの掲載)を前提にせず、「OpenAI 社員による退役予告はあるが公式 lifecycle ドキュメントには未掲載」という現状を認識した上で、この repository の Claude Code integration では GPT-5.3-Codex-Spark を退役済みとして扱う方針を実装する。この repository-local な退役判断は upstream の正式判断の有無に関わらず独立して成立させる。

In Scope

  • launcher-owned --agents から spark-codex definition を撤去する。
  • gpt-5.3-codex-spark を model binding / delegation target として生成する repository code を撤去する。
  • @agent-spark-codex、DELEGATION_REQUEST_V1 の Spark-specific authorization、model pin、evidence path を current architecture に応じて削除または retired rejection へ変更する。
  • DELEGATION_REQUEST_V1 が Spark 専用なら不要な parser/gate/state を除去する。別用途と共有される場合は shared infrastructure を残し、Spark-specific branch だけを撤去する。
  • workflow capability preflight route(scripts/claude-gpt/workflow_capability_preflight.py、.claude/skills/issue-refinement-loop/scripts/workflow_start_entry.py、.claude/skills/issue-refinement-loop/scripts/root_entry_router.py、scripts/agent-guards/skill_runtime_exec.py の _sanitize_env())から Spark 判定・環境変数受理・転送を撤去する。GitHub 認証 / repository read / 共通 deadline・timeout handling / AGY delegation route / operation route checking のような shared infrastructure は撤去しない。
  • explicit Spark request が別モデルへ silent fallback しないことを negative regression test で固定する。
  • scripts/claude-gpt/runtime_smoke_test.sh の --spark-delegation を、黙った fallthrough ではなく明示的な非ゼロ終了(退役エラー)にする。この修正は既存の catch-all 引数処理の挙動を変えず、Spark 専用フラグの認識だけを退役エラーに変える。
  • Spark が利用可能であることを前提とする live smoke / model precedence / evidence tests は、ファイルパスを維持したまま retirement contract の negative test に置換する(ファイル削除は選ばない)。
  • 通常 SubAgent 用 smoke canary 生成(claude_gpt_smoke_canary_agents_json_fragment 経路)が Spark 定数抽出に依存せず動作することを確認・維持する。
  • docs / comments / fixtures の Spark availability claim を current contract と一致させる。
  • Issue 本文の Upstream status 節を、OpenAI 社員による退役予告(社会的発表)と公式 API lifecycle ドキュメント未掲載の区別が分かる記述に更新する。

Out of Scope

  • Spark の代替となる新しい external model delegation の追加。
  • issue-refinement-loop Step 2 の background execution contract 自体の変更。
  • Claude-GPT session 全体の background-task policy の再設計。これは別 Issue(実装: Claude-GPT launcher と issue-refinement-loop Step 2 の background+join 契約を整合させる #2652)で扱う。
  • CLAUDE_CODE_DISABLE_BACKGROUND_TASKS の unset・Bash.run_in_background の復元・Claude-GPT session-wide background capability restoration。Spark 退役により Spark 固有の foreground invariant が不要になる事実は本 Issue の Background/Outcome に記述してよいが、その撤去・復元の実装自体は 実装: Claude-GPT launcher と issue-refinement-loop Step 2 の background+join 契約を整合させる #2652 の scope として維持する。ただし scripts/claude-gpt/tests/test_background_execution_foreground_invariant.py の fixture が scripts/agent-ops/run_worktree_agent_runtime_smoke.py::extract_spark_gate_writer_source()(Current Validated Scope の marker 撤去に伴い常に None を返すようになる)に依存している箇所を negative test へ置換することは、AC1 の VC を満たすための直接的かつ不可避な帰結として本 Issue の scope に含む(Allowed Paths 参照)。同ファイルが検証する background/foreground-disable invariant ロジック本体・CLAUDE_CODE_DISABLE_BACKGROUND_TASKS/Bash.run_in_background に関わる部分は本 Issue では変更しない(引き続き 実装: Claude-GPT launcher と issue-refinement-loop Step 2 の background+join 契約を整合させる #2652 の scope)。
  • CLAUDE_CODE_FORK_SUBAGENT の扱いの見直し。background disable とは別論点として維持・評価する(実装: Claude-GPT launcher と issue-refinement-loop Step 2 の background+join 契約を整合させる #2652 側)。
  • OpenAI upstream の model lifecycle を repository 側から推測・再定義すること。公式 API deprecations ドキュメントへの掲載有無の確定作業。
  • 新しい承認ゲート・approval layer・persistent ledger・migration machinery・model catalog 全体の allowlist 化・常時モデル監査の新設。
  • 外部 proxy(例: raine/claude-code-proxy のような repository 外の実装)を fork・改修すること、または利用者が repository 外で定義した任意の agent/通信までを禁止対象に広げること。保証対象は repository が提供する launcher・生成する agent 定義・workflow 入力・dispatch 処理・smoke コマンドに限る。
  • ユーザー認証・履歴・既存 session の破壊的な移行処理。新しい起動が古い Spark 用設定を利用しないことの確認で足り、過去の state を再帰的に全削除する要求ではない。

Acceptance Criteria

  • AC1 repository-owned Claude-GPT / Claude Code invocation が spark-codex custom agent definition を公開しない。launcher の hook wiring にも SPARK_GATE_WRITER command が注入されない。
  • AC2 repository code(launcher・workflow capability preflight を含む)が gpt-5.3-codex-spark を execution model として選択・注入・dispatch しない。
  • AC3 @agent-spark-codex または旧 Spark delegation directive(required/preferred/preferred + fallback: allowed のいずれの旧指定も含む)を実行指定として入力しても GPT-5.3-Codex-Spark は起動せず、別モデル・別 Agent への silent fallback も発生しない。
  • AC4 Spark 専用 authorization / evidence / model-precedence infrastructure のうち不要になった code と tests を、ファイルパスを維持したまま retired route の内容へ置換し(削除は選ばない)、GitHub 認証・repository read・共通 deadline/timeout handling・AGY delegation route・operation route checking のような shared infrastructure は維持する。
  • AC5 current test suite は「Spark を利用可能」とする positive contract を持たず、退役 route の deterministic rejection を検証する。対象は以下を含む: (a) 既存 Spark 専用テスト scripts/claude-gpt/tests/test_issue_2274_spark_evidence_semantics.py、test_spark_auth_deny_migration.py、test_spark_auth_deny_runtime_smoke.py、test_spark_fallback_route.py、scripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_spark_explicit_gate.py。(b) wcp.SPARK_* 定数・_spark_capability()/_spark_delegation_capability() を positive contract として直接参照するテスト(test_workflow_capability_preflight.py、test_workflow_capability_preflight_deadline.py、test_capability_preflight_review_fixes.py、test_actor_scoped_capability_probe.py、test_issue_to_impl_credential_parity.py。test_runtime_smoke_issue_to_impl_live.py は同様の対象だが live-gated のため本 AC の baseline VC には含めず Allowed Paths のみで扱う)。(c) SPARK_GATE_WRITER hook wiring・spark-codex の --agents 登録を positive contract として直接検証するテスト(test_delegation_directive.py、test_latitude_stop_hook_wiring.py、test_model_precedence_negative_controls.py、test_available_models_fallback_detection.py、test_smoke_canary_env_channel_hardening.py、scripts/claude-gpt/test_launch_strict_mcp_config_normalization.py、scripts/claude-gpt/tests/test_background_execution_foreground_invariant.py(extract_spark_gate_writer_source() 依存 fixture assertion のみ。background/foreground-disable invariant ロジック本体は対象外)。(d) LOOP_SPARK_MODE/LOOP_SPARK_FALLBACK の allowlist carry-through を positive contract として直接検証するテスト(.claude/skills/issue-refinement-loop/scripts/tests/test_skill_runtime_exec_env_allowlist.py、tests/agent_ops/test_control_plane_worktree_bootstrap.py)。下記 Verification Guidance 参照。
  • AC6 repo-wide search で executable/configured Spark route が残っていない。historical issue/comment/artifact の参照は削除対象にしない。
  • AC7 ordinary Claude Code / Claude-GPT workflows と非 Spark SubAgent execution(通常 smoke canary 生成・起動を含む)に回帰がない。spark_mode=None で呼ぶ既存 ordinary caller(assess() 等のキーワード引数シグネチャを使うもの)は無変更で動作し続ける。
  • AC8 scripts/claude-gpt/workflow_capability_preflight.py / .claude/skills/issue-refinement-loop/scripts/workflow_start_entry.py / .claude/skills/issue-refinement-loop/scripts/root_entry_router.py / scripts/agent-guards/skill_runtime_exec.py の _sanitize_env() から Spark 判定・環境変数受理・転送経路が撤去され、LOOP_SPARK_MODE/LOOP_SPARK_FALLBACK 指定時は deterministic な retired rejection を返す。GitHub 認証・AGY・deadline・operation route の probe は spark_mode 未指定でも変わらず成功する。
  • AC9 scripts/claude-gpt/runtime_smoke_test.sh --spark-delegation のような旧フラグが、catch-all 引数処理へ黙って fallthrough して通常 smoke として成功しない。明示的な非ゼロ終了になる。
  • AC10 通常 SubAgent 用 smoke canary の生成(claude_gpt_smoke_canary_agents_json_fragment 経路、--agents へ渡す merged JSON の生成)が、Spark 定数・SPARK_AGENTS_JSON 生成関数の撤去後も動作する。

Verification Commands

標準静的検証(プロジェクト全体の baseline、特定 AC には紐付けない):

$ pnpm typecheck
$ pnpm lint
$ pnpm test
$ pnpm build

AC ごとの検証:

# AC1
$ ! rg -q "spark-codex" scripts/claude-gpt/lib.sh scripts/claude-gpt/launch.sh

# AC2
$ ! rg -q "gpt-5\.3-codex-spark" scripts/claude-gpt/launch.sh scripts/claude-gpt/workflow_capability_preflight.py

# AC3
$ uv run pytest scripts/claude-gpt/tests/test_spark_fallback_route.py scripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_spark_explicit_gate.py -v

# AC4
$ uv run pytest scripts/claude-gpt/tests/test_issue_2274_spark_evidence_semantics.py -v

# AC5
$ uv run pytest scripts/claude-gpt/tests/test_spark_auth_deny_migration.py scripts/claude-gpt/tests/test_spark_auth_deny_runtime_smoke.py scripts/claude-gpt/tests/test_workflow_capability_preflight.py scripts/claude-gpt/tests/test_workflow_capability_preflight_deadline.py scripts/claude-gpt/tests/test_capability_preflight_review_fixes.py scripts/claude-gpt/tests/test_actor_scoped_capability_probe.py scripts/claude-gpt/tests/test_issue_to_impl_credential_parity.py -v

# AC5
$ uv run pytest scripts/claude-gpt/tests/test_delegation_directive.py scripts/claude-gpt/tests/test_latitude_stop_hook_wiring.py scripts/claude-gpt/tests/test_model_precedence_negative_controls.py scripts/claude-gpt/tests/test_available_models_fallback_detection.py scripts/claude-gpt/tests/test_smoke_canary_env_channel_hardening.py scripts/claude-gpt/test_launch_strict_mcp_config_normalization.py scripts/claude-gpt/tests/test_background_execution_foreground_invariant.py -v

# AC5
$ uv run pytest .claude/skills/issue-refinement-loop/scripts/tests/test_skill_runtime_exec_env_allowlist.py tests/agent_ops/test_control_plane_worktree_bootstrap.py -v

# AC6
# baseline-expect: pass
$ rg -n -e "spark-codex" -e "gpt-5\.3-codex-spark" -e "DELEGATION_MODEL" -e "DELEGATION_AGENT_ID" scripts/claude-gpt/lib.sh scripts/claude-gpt/launch.sh scripts/claude-gpt/runtime_smoke_test.sh scripts/claude-gpt/workflow_capability_preflight.py .claude/skills/issue-refinement-loop/scripts/workflow_start_entry.py .claude/skills/issue-refinement-loop/scripts/root_entry_router.py scripts/agent-guards/skill_runtime_exec.py .claude/skills/issue-refinement-loop/SKILL.md

# AC7
$ uv run pytest .claude/skills/issue-refinement-loop/scripts/tests/test_workflow_start_entry.py -v

# AC8
$ uv run pytest .claude/skills/issue-refinement-loop/scripts/tests/test_workflow_start_entry_canonical_executor.py .claude/skills/issue-refinement-loop/scripts/tests/test_workflow_start_entry_compact_stdout_grammar.py .claude/skills/issue-refinement-loop/scripts/tests/test_root_entry_router_workflow_capability.py -v

# AC9
$ uv run pytest scripts/claude-gpt/tests/test_runtime_smoke_test_spark_delegation_retired.py -v

# AC10
$ uv run pytest scripts/claude-gpt/tests/test_smoke_harness_canary_fixture.py -v

model ID 検索だけでは拾えない semantic route を広く確認する追加調査は、下記 Verification Guidance の rg コマンドで行う(git grep は preflight の git read-only allowlist 外のため VC には含めない)。

Verification Guidance

test_runtime_smoke_issue_to_impl_live.py は live 環境(実際の ChatGPT auth 等)を前提とする既存の live-gated smoke test であり、Runtime Verification Applicability の execution_environment(外部ネットワーク・ライブ Spark 認証への依存なし)と矛盾しないよう、AC5 の baseline Verification Commands には含めない。実装時はこのファイル内の wcp.SPARK_* 参照を retired route の内容へ置換した上で、既存の live-gate(環境未整備時は SKIP)に従わせる。

model ID だけの検索で完了判定しないこと。少なくとも以下を確認する。

rg -n -e "spark-codex" -e "gpt-5\.3-codex-spark" -e "DELEGATION_MODEL" -e "DELEGATION_AGENT_ID" scripts .claude docs
rg -n -I -i -e "spark" -e "DELEGATION_REQUEST_V1" -e "DELEGATION_MODEL" -e "DELEGATION_AGENT_ID" scripts .claude docs

検索結果は、LOOP_SPARK_MODE/LOOP_SPARK_FALLBACK/spark_mode/spark_fallback/spark_delegation/fallback_route/non_spark_agent のような model ID 以外の semantic route を含め、次の4分類に振り分けて評価する。

分類 説明 完了条件との関係
executable/configured route 実行に到達する経路(launcher --agents、workflow capability preflight の判定分岐等) AC1/AC2/AC8 の対象。すべて撤去または deterministic rejection に変更されていること
intentional retired rejection 明示的な退役拒否として実装済みの分岐 AC3/AC9 の対象。識別子・関連コードが残っていて構わない
negative regression test 退役拒否・silent fallback回避を検証するテスト AC5 の対象。旧 positive test をファイルパス維持のまま置換して確認する(削除は選ばない)
documentation/history/reference docs・comment・historical issue参照のみ 削除対象にしない(AC6)

spark 文字列が repository から完全に 0 件になることを成功条件にしない。 退役エラーのメッセージ、negative regression test の識別子、historical reference には引き続き spark の文字列が残ってよい。

入力の扱いは、次の境界で固定する(AC3/AC9 に対応)。

入力 推奨する扱い
実行指定としての canonical Spark mention 退役エラー。同じ要求で自動代替 dispatch しない
Spark 向けの有効な旧 directive required/preferred にかかわらず退役エラー
旧 preferred + fallback: allowed 過去の fallback 許可を引き継がず、退役エラー
コードブロック・引用・inline code 内の旧指定 データとして扱い、通常作業を妨げない
Spark を指定していない通常の delegation 従来どおり進める

focused tests では最低限以下を実証する。

  • launcher が spark-codex を --agents に含めない
  • legacy explicit Spark directive が起動に到達しない
  • fallback で別 model / 別 Agent が実行されたことを success と扱わない
  • 旧 CLI/環境変数からの Spark 指定が、黙って無視・除去されず、所有境界(workflow capability preflight の入口)で退役エラーになる
  • 旧 --spark-delegation smoke が、通常 smoke へ fallthrough せず明示的な非ゼロ終了になる
  • ordinary non-Spark execution(通常 SubAgent canary 生成・起動を含む)は維持される

Allowed Paths

  • scripts/claude-gpt/lib.sh
  • scripts/claude-gpt/launch.sh
  • scripts/claude-gpt/runtime_smoke_test.sh
  • scripts/claude-gpt/workflow_capability_preflight.py
  • .claude/skills/issue-refinement-loop/scripts/workflow_start_entry.py
  • .claude/skills/issue-refinement-loop/scripts/root_entry_router.py
  • scripts/agent-guards/skill_runtime_exec.py
  • .claude/skills/issue-refinement-loop/SKILL.md
  • scripts/claude-gpt/tests/test_issue_2274_spark_evidence_semantics.py
  • scripts/claude-gpt/tests/test_spark_auth_deny_migration.py
  • scripts/claude-gpt/tests/test_spark_auth_deny_runtime_smoke.py
  • scripts/claude-gpt/tests/test_spark_fallback_route.py
  • scripts/agent-ops/tests/test_run_worktree_agent_runtime_smoke_spark_explicit_gate.py
  • .claude/skills/issue-refinement-loop/scripts/tests/test_root_entry_router_workflow_capability.py
  • .claude/skills/issue-refinement-loop/scripts/tests/test_workflow_start_entry.py
  • .claude/skills/issue-refinement-loop/scripts/tests/test_workflow_start_entry_canonical_executor.py
  • .claude/skills/issue-refinement-loop/scripts/tests/test_workflow_start_entry_compact_stdout_grammar.py
  • scripts/claude-gpt/tests/test_smoke_harness_canary_fixture.py
  • scripts/claude-gpt/tests/test_runtime_smoke_test_spark_delegation_retired.py(新規作成。--spark-delegation が catch-all へ fallthrough せず明示的な非ゼロ終了になることを検証する negative regression test)
  • scripts/claude-gpt/tests/test_workflow_capability_preflight.py(wcp.SPARK_UNAVAILABLE/SPARK_FALLBACK_ONLY 等を positive contract として参照しているため retired route の negative test へ置換)
  • scripts/claude-gpt/tests/test_workflow_capability_preflight_deadline.py(同上)
  • scripts/claude-gpt/tests/test_capability_preflight_review_fixes.py(同上)
  • scripts/claude-gpt/tests/test_actor_scoped_capability_probe.py(wcp._spark_delegation_capability() を直接呼び出しているため同様に置換)
  • scripts/claude-gpt/tests/test_issue_to_impl_credential_parity.py(spark_mode/spark_fallback 経由の positive contract を参照しているため同様に置換)
  • scripts/claude-gpt/tests/test_runtime_smoke_issue_to_impl_live.py(live-gated だが wcp.SPARK_* を直接参照するため import/collection 破壊を避けるべく同様に置換。live 環境依存のため AC5 の baseline Verification Commands には含めない)
  • scripts/claude-gpt/tests/test_delegation_directive.py(@agent-spark-codex directive・SPARK_GATE_WRITER_PY_BEGIN/_END マーカー抽出を positive contract として検証しているため negative test へ置換)
  • scripts/claude-gpt/tests/test_latitude_stop_hook_wiring.py(hook に SPARK_GATE_WRITER command が注入されることを positive contract として検証しているため同様に置換)
  • scripts/claude-gpt/tests/test_model_precedence_negative_controls.py(DELEGATION_MODEL = "gpt-5.3-codex-spark" を前提とした model precedence 検証のため同様に置換)
  • scripts/claude-gpt/tests/test_available_models_fallback_detection.py(REQUESTED_MODEL = "gpt-5.3-codex-spark" を前提としているため同様に置換)
  • scripts/claude-gpt/tests/test_smoke_canary_env_channel_hardening.py(set(agents.keys()) == {"spark-codex"}/{"spark-codex", canary_name} を positive contract として assert しているため同様に置換。置換後は AC1 と一致する形にする)
  • scripts/claude-gpt/test_launch_strict_mcp_config_normalization.py(agents_flag の spark-codex model 一致、SPARK_GATE_WRITER hook 保持を positive contract として検証しているため同様に置換)
  • scripts/agent-ops/run_worktree_agent_runtime_smoke.py(extract_spark_gate_writer_source()。launch.sh の SPARK_GATE_WRITER_PY_BEGIN/_END マーカー撤去に伴い Spark 専用 helper のため撤去する。消費者は test_run_worktree_agent_runtime_smoke_spark_explicit_gate.py に加えて test_background_execution_foreground_invariant.py の fixture も含む)
  • scripts/claude-gpt/tests/test_background_execution_foreground_invariant.py(extract_spark_gate_writer_source() 依存 fixture のみ negative test へ置換。実装: Spark delegation の per-invocation model pin 回帰を解消し final-diff live E2E を必須化する #2274 由来の background/foreground-disable invariant ロジック自体・CLAUDE_CODE_DISABLE_BACKGROUND_TASKS/Bash.run_in_background に関わる部分・実装: Claude-GPT launcher と issue-refinement-loop Step 2 の background+join 契約を整合させる #2652 scope boundary は変更しない)
  • .claude/skills/issue-refinement-loop/scripts/tests/test_skill_runtime_exec_env_allowlist.py(LOOP_SPARK_MODE/LOOP_SPARK_FALLBACK の allowlist carry-through を positive contract として検証しているため negative test へ置換)
  • tests/agent_ops/test_control_plane_worktree_bootstrap.py(同上の allowlist carry-through を positive contract として検証しているため同様に置換)
  • docs/dev/claude-gpt-runtime-prerequisites.md(checks.spark.status の説明を撤去済みの事実に合わせて更新)
  • docs/dev/agent-skill-boundaries.md(「将来の Spark 設計は...実装: 通常 claude-gpt 対話中、明示 @ 指示時だけ GPT-5.3-Codex-Spark SubAgent を起動する #2186 が別途所有する」という記述のみ更新。Manual Spark Agents 撤去に関する historical な記述部分は変更しない)
  • scripts/claude-gpt/preflight.sh(--workflow-profile 説明コメントの Spark route capability 記述のみ更新。実行ロジックは変更しない)

assets/ / LICENSES/ への変更は対象外(CLAUDE.md)。scripts/claude-gpt/tests/test_background_execution_foreground_invariant.py は extract_spark_gate_writer_source() 依存 fixture assertion のみ Allowed Paths に含む (同ファイルの background/foreground-disable invariant ロジック本体・CLAUDE_CODE_DISABLE_BACKGROUND_TASKS/Bash.run_in_background に関わる部分は 引き続き Out of Scope、#2652)。scripts/claude-gpt/tests/test_timeout_taxonomy_compat.py、scripts/claude-gpt/tests/test_runtime_smoke_issue_to_impl.py、scripts/agent-guards/tests/test_capability_artifact_sanitization.py は spark_mode=None の ordinary caller であり変更不要(上記 Current Validated Scope「呼び出し契約の維持」参照)。

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
  • scripts/claude-gpt/tests/test_background_execution_foreground_invariant.py の background/foreground-disable invariant ロジック本体(extract_spark_gate_writer_source() 依存 fixture assertion の negative test 置換を除く)や CLAUDE_CODE_DISABLE_BACKGROUND_TASKS/Bash.run_in_background に関わる変更が必要と判明した場合(実装: Claude-GPT launcher と issue-refinement-loop Step 2 の background+join 契約を整合させる #2652 の scope のため、本 Issue では変更しない)
  • --agents へ任意の JSON を受け入れる新しい汎用入口の追加が必要と判明した場合(既存の内部 canary 生成経路の流用に留める)

Required Skills

  • Shell(POSIX 準拠、bash の引数解析・quoting)
  • Python(subprocess 起動・環境変数 sanitize・CLI argument parsing)
  • pytest(fake subprocess / fixture ベースの regression test 設計)

Required Design References

  • docs/dev/agent-skill-boundaries.md
  • .claude/skills/issue-refinement-loop/SKILL.md

Scope Delta(任意)

N/A

Related

Spark retirement 後に不要になる foreground/background invariant があっても、Claude-GPT session の background compatibility の是正は #2652 で行い、本 Issue で issue-refinement-loop の契約を巻き込まない。

Activity

  1. squne121 commented on Sep 17, 2026

    @squne121
    OwnerAuthor

    判定:REQUEST_CHANGES。退役方針には賛成ですが、削除範囲と完了条件を補強すべきです

    このIssueは、Sparkの代替モデルを新設するより、不要になったdelegation経路と専用の検証・制御を削減する方向で進めるのが適切です。

    ただし現状の本文では、launcherのSpark定義を消しても、workflow側にSparkの利用可否判定やfallback経路が残る一方、通常SubAgentの検証まで削除に巻き込む余地があります。追加のセキュリティ基盤ではなく、この境界を具体化する修正を推奨します。

    調査は main の e514ed583ac68f184cb5e2ed2210edd52e5e07e7 を基準に、#2651本文、#2274と実装PR #2285の差分・レビューコメント、#2652、#2631の停止報告、関連コードを照合しました。#2651自身のコメントは取得時点で0件です。今回はIssueの設計と現行実装の静的レビューであり、実CLI・テストの実行やGitHubへの書き込みはしていません。

    1. P1:退役対象にworkflow capability経路が抜けています

    本文で挙げている lib.sh、launch.sh、Spark専用テストだけでは、現在の依存関係を十分に表せていません。

    現行の workflow_start_entry.py は、CLI引数または環境変数の LOOP_SPARK_MODE/LOOP_SPARK_FALLBACK を受け取り、root_entry_router.capability_preflight_result() に渡します。canonical executor側にも、この環境変数を通す経路があります。つまり、Spark指定はlauncherのプロンプト処理だけに閉じていません。

    さらに workflow_capability_preflight.py は、現在も次の判定を返します。

    Spark指定あり + binary/auth利用可能
      → eligible
    

    Spark指定あり + binary/auth利用不能 + fallback=allowed
    → fallback_only
    → actor側の fallback_route = non_spark_agent

    ここで確認しているのは主にbinaryと認証の状態であり、Sparkの退役状態ではありません。launcherの定義を削除しても、このproducerはSparkを eligible と判定し続ける、または非Sparkへのfallbackを提示し続ける構造です。

    起き得る不具合

    「Spark経路は存在しないが、preflightでは利用可能」「退役した指定なのに通常Agentへのfallback候補が返る」という不整合です。これは本文のAC2・AC3・AC4・AC6に関わります。

    推奨修正

    退役inventoryに、少なくとも以下の経路を追加してください。

    scripts/claude-gpt/workflow_capability_preflight.py
    .claude/skills/issue-refinement-loop/scripts/workflow_start_entry.py
    .claude/skills/issue-refinement-loop/scripts/root_entry_router.py
    scripts/agent-guards/skill_runtime_exec.py
    .claude/skills/issue-refinement-loop/SKILL.md
    対応する capability / fallback / timeout テスト

    これらにSpark関連の入力・記述・テストがあることは、コード検索でも確認できています。Step 2のbackground契約を変える話ではなく、既存のSpark入力・判定だけを取り除く話として扱えます。

    特に注意したいのは、環境変数をallowlistから消すだけでは、旧Spark指定が黙って捨てられ、通常実行になる可能性があることです。旧入力を受け付けないなら、最初のrepository-owned境界で退役エラーにするか、拒否箇所まで入力を届けてから拒否してください。

    一方、GitHub認証・repository read・共通deadlineなどは残すべきです。Spark判定の削除を、workflow preflight全体の撤去に広げる必要はありません。

    2. P1:旧指定の「拒否」と、単なる記述・引用の扱いを固定する必要があります

    本文は、旧 @agent-spark-codex/DELEGATION_REQUEST_V1 を削除するか、退役として拒否する方向を認めています。しかし、どの入力をどの段階で拒否するかまでは決まっていません。

    ここを曖昧にすると、両方向の問題が起きます。

    削除しすぎる場合は、旧directiveが普通の文章としてモデルに渡り、別Agentで処理される可能性があります。逆に、識別子の部分一致で拒否する場合は、「Sparkの退役ドキュメントを修正する」という通常作業まで妨げます。

    推奨する境界は、次のように狭くすることです。

    入力 推奨する扱い
    実行指定としてのcanonical Spark mention 退役エラー。同じ要求で自動代替dispatchしない
    Spark向けの有効な旧directive required/preferredにかかわらず退役エラー
    旧 preferred + fallback: allowed 過去のfallback許可を引き継がず、退役エラー
    コードブロック・引用・inline code内の旧指定 データとして扱い、通常作業を妨げない
    Sparkを指定していない通常のdelegation 従来どおり進める

    最後のケースは、過去のstateを再帰的に全削除する要求ではありません。新しい起動が古いSpark用設定を利用しないことを確認すればよく、ユーザーの認証・履歴や既存sessionを破壊する移行処理は不要です。

    検索についても、本文のmodel ID中心の rg だけでは、今回見つかった spark_mode/spark_fallback のような意味的な残存を拾い切れません。追跡ファイル全体を広めに確認し、残存箇所を「実行経路」「退役拒否」「negative test」「履歴」に分類する方が適切です。

    git grep -n -I -i -E \
      'spark|DELEGATION_REQUEST_V1|DELEGATION_MODEL|DELEGATION_AGENT_ID'

    文字列が0件であることを成功条件にしないのも重要です。退役エラーや回帰テストには、識別子が残っていて構いません。

    upstreamの状況説明は、軽く更新した方が正確です

    本文の「公式の退役告知は確認できない」という説明には、追加の調査材料があります。OpenAI Developer Communityの9月15日・16日の案内には、2026年9月11日付の @thsottiaux によるSpark退役予定投稿が引用されています。(OpenAI Developer Community)

    ただし今回、X原文そのものは取得できておらず、全アカウントの提供終了日時まで確認できたわけではありません。「告知が存在しない」「特定アカウントで利用できない」「repositoryとして利用をやめる」は分けて記載すべきです。

    この調査を退役実装のブロッカーにする必要はなく、repository-localな退役判断を独立させる現在の方針は維持してよいと考えます。


    最終提案

    #2651は分割し直さず、既存Issueを補強して進めるのがよいです。 主な修正は、workflow capability経路を退役対象に加えること、旧入力を黙って通常実行へ落とさないこと、共通smokeからSpark依存だけを外すことです。

    完成形は、Sparkの定義・認可state・専用evidenceはなくなり、旧入口には小さな退役エラーだけが残り、普通のAgent作業はそのまま動く状態です。新しい承認ゲートや監査基盤を増やすより、この形が今回の品質と使い勝手の両方に合っています。

    ## 判定:`REQUEST_CHANGES`。退役方針には賛成ですが、削除範囲と完了条件を補強すべきです

    このIssueは、Sparkの代替モデルを新設するより、不要になったdelegation経路と専用の検証・制御を削減する方向で進めるのが適切です。

    ただし現状の本文では、launcherのSpark定義を消しても、workflow側にSparkの利用可否判定やfallback経路が残る一方、通常SubAgentの検証まで削除に巻き込む余地があります。追加のセキュリティ基盤ではなく、この境界を具体化する修正を推奨します。

    調査は main の e514ed583ac68f184cb5e2ed2210edd52e5e07e7 を基準に、#2651本文、#2274と実装PR #2285の差分・レビューコメント、#2652、#2631の停止報告、関連コードを照合しました。#2651自身のコメントは取得時点で0件です。今回はIssueの設計と現行実装の静的レビューであり、実CLI・テストの実行やGitHubへの書き込みはしていません。

    1. P1:退役対象にworkflow capability経路が抜けています

    本文で挙げている lib.sh、launch.sh、Spark専用テストだけでは、現在の依存関係を十分に表せていません。

    現行の workflow_start_entry.py は、CLI引数または環境変数の LOOP_SPARK_MODE/LOOP_SPARK_FALLBACK を受け取り、root_entry_router.capability_preflight_result() に渡します。canonical executor側にも、この環境変数を通す経路があります。つまり、Spark指定はlauncherのプロンプト処理だけに閉じていません。

    さらに workflow_capability_preflight.py は、現在も次の判定を返します。

    Spark指定あり + binary/auth利用可能
      → eligible
    
    Spark指定あり + binary/auth利用不能 + fallback=allowed
      → fallback_only
      → actor側の fallback_route = non_spark_agent
    

    ここで確認しているのは主にbinaryと認証の状態であり、Sparkの退役状態ではありません。launcherの定義を削除しても、このproducerはSparkを eligible と判定し続ける、または非Sparkへのfallbackを提示し続ける構造です。

    起き得る不具合

    「Spark経路は存在しないが、preflightでは利用可能」「退役した指定なのに通常Agentへのfallback候補が返る」という不整合です。これは本文のAC2・AC3・AC4・AC6に関わります。

    推奨修正

    退役inventoryに、少なくとも以下の経路を追加してください。

    scripts/claude-gpt/workflow_capability_preflight.py
    .claude/skills/issue-refinement-loop/scripts/workflow_start_entry.py
    .claude/skills/issue-refinement-loop/scripts/root_entry_router.py
    scripts/agent-guards/skill_runtime_exec.py
    .claude/skills/issue-refinement-loop/SKILL.md
    対応する capability / fallback / timeout テスト
    

    これらにSpark関連の入力・記述・テストがあることは、コード検索でも確認できています。Step 2のbackground契約を変える話ではなく、既存のSpark入力・判定だけを取り除く話として扱えます。

    特に注意したいのは、環境変数をallowlistから消すだけでは、旧Spark指定が黙って捨てられ、通常実行になる可能性があることです。旧入力を受け付けないなら、最初のrepository-owned境界で退役エラーにするか、拒否箇所まで入力を届けてから拒否してください。

    一方、GitHub認証・repository read・共通deadlineなどは残すべきです。Spark判定の削除を、workflow preflight全体の撤去に広げる必要はありません。

    2. P1:旧指定の「拒否」と、単なる記述・引用の扱いを固定する必要があります

    本文は、旧 @agent-spark-codex/DELEGATION_REQUEST_V1 を削除するか、退役として拒否する方向を認めています。しかし、どの入力をどの段階で拒否するかまでは決まっていません。

    ここを曖昧にすると、両方向の問題が起きます。

    削除しすぎる場合は、旧directiveが普通の文章としてモデルに渡り、別Agentで処理される可能性があります。逆に、識別子の部分一致で拒否する場合は、「Sparkの退役ドキュメントを修正する」という通常作業まで妨げます。

    推奨する境界は、次のように狭くすることです。

    入力 推奨する扱い
    実行指定としてのcanonical Spark mention 退役エラー。同じ要求で自動代替dispatchしない
    Spark向けの有効な旧directive required/preferredにかかわらず退役エラー
    旧 preferred + fallback: allowed 過去のfallback許可を引き継がず、退役エラー
    コードブロック・引用・inline code内の旧指定 データとして扱い、通常作業を妨げない
    Sparkを指定していない通常のdelegation 従来どおり進める

    たとえば、次の二つは区別すべきです。

    @agent-spark-codex この差分を調べて
    → 退役した実行指定として拒否
    
    文書中の `@agent-spark-codex` を「退役済み」の説明に直して
    → 通常の文書編集として実行
    

    実装方法としては、既存の入力境界に小さな退役判定を残す程度で十分です。承認token、nonce、pending state、消費済みlock、model evidenceを維持する理由にはなりません。

    なお、Claude Codeの公式仕様では、PreToolUseのdenyはそのtool callを止めるもので、会話全体を終了させるものではありません。旧要求自体を処理させない設計なら、UserPromptSubmitの decision: "block" が目的に近く、additionalContextで注意文を足すだけとは区別が必要です。これはrepositoryが所有する入力経路に限定して使い、native Claude Codeのあらゆる自然言語入力を監視する仕組みに広げるべきではありません。(Claude)

    3. P1:共通smokeがSpark定義に依存しており、単純削除では検証が壊れます

    通常SubAgent用canaryまでSparkに結合されています

    現在のlauncherは、通常smoke用canaryの生成でも CLAUDE_GPT_SPARK_AGENT_NAME を渡し、生成したJSONを SPARK_AGENTS_JSON と結合しています。したがって、Spark定数・JSON生成だけを削除すると、通常SubAgentのcanary生成・起動も巻き込まれます。

    ここは「Spark用テストを削除したから完了」ではなく、次の形に分離するのが適切です。

    通常起動
      → Spark定義なし。不要なら --agents 自体を渡さない
    
    通常SubAgentのsmoke
      → 既存の内部canaryだけを --agents で渡す
    
    旧Spark専用smoke
      → 退役エラー
    

    AC1の「Spark定義を渡さない」と、「すべての --agents を禁止する」は別です。 canaryは既存の内部生成経路を流用し、任意JSONを受け入れる新しい入口を作る必要はありません。

    旧smokeフラグを黙って無視すると、別の検証で成功してしまいます

    さらに、runtime_smoke_test.sh の引数処理には、未知の引数を shift して読み飛ばす分岐があります。現在は --spark-delegation を別途認識していますが、この認識と専用処理だけを消すと、次の呼び出しが通常smokeへ落ちる可能性があります。

    scripts/claude-gpt/runtime_smoke_test.sh --spark-delegation

    これは、Sparkを動かしていないのに、旧Spark検証コマンドが別シナリオの成功で終わる問題です。

    最小修正は、旧フラグを明示的に退役エラーにすることです。たとえばexit 2で、環境確認やClaude起動より前に終了させる。Sparkのライブ利用可否を確認する必要はありません。

    また、このsmokeには issue_create/issue_to_impl のシナリオも同居しています。preflight.sh --env-only はSpark以外の環境確認にも使われているので、名前や過去の由来だけで共通処理を削除しないことが重要です。

    4. P2:「repository-owned経路」の保証範囲が広すぎると、終わらない退役作業になります

    実際の配布物も確認しました。取得時点の raine/claude-code-proxy 最新releaseは v0.1.40 で、同版の実装には以下が残っています。

    • gpt-5.3-codex-spark のregistry/allowlist登録。
    • 各モデルの -fast 別名生成と、base modelへの解決。
    • 入力末尾の [1m] を取り除く正規化。

    これはSparkが現在利用可能だという証拠ではありません。proxy実装が、その識別子を引き続き解釈するという証拠です。

    したがって、「repositoryのSpark文字列を消した」「upstreamで利用不能になった」のどちらも、repository-owned経路での決定的な拒否を証明しません。

    一方で、これを理由にproxyをforkしたり、すべてのユーザー設定・通信を監視する仕組みを追加するのも過剰です。

    推奨する範囲の書き方

    保証対象は、repositoryが提供するlauncher、生成するagent定義、workflow入力、dispatch処理、smokeコマンドとする。外部proxyを直接呼ぶ操作や、利用者がrepository外で定義した任意のagentまで禁止するものではない。

    その上で、launcher経由の明示的な --model 指定まで対象にするなら、モデル引数として受けた値について、実際のproxyが解釈する表記を考慮して拒否すべきです。

    gpt-5.3-codex-spark
    gpt-5.3-codex-spark-fast
    上記に [1m] が付いた表記
    

    現行launcherは追加引数をClaudeへ渡す構造なので、delegation定義の削除だけで、この種の明示モデル指定まで扱ったと見なすべきではありません。

    ここで必要なのは、所有している入力に対する小さな正規化・比較です。モデルカタログ全体のallowlist化、新しいpolicy engine、常時モデル監査は不要です。

    5. P2:#2652との分担を、同じファイルを触る前提で明記すべきです

    #2652を別Issueにしている判断は妥当です。ただし、両Issueが launch.sh とforeground関連テストを触るため、削除の担当を明記した方が安全です。

    #2652は、#2651完了後にsession-globalなbackground disableを見直す方針で、CLAUDE_CODE_FORK_SUBAGENT のunsetは別論点として維持・評価することも明示しています。#2651でこの二つを一括削除すると、後続Issueの検証範囲を先取りします。

    推奨する分担は以下です。

    対象 担当
    Spark定義、認可state、Spark専用model/evidence、Spark固有のforeground検査 #2651で退役
    通常SubAgent canary・共通smokeからSpark依存を外す #2651
    session-globalなbackground disableの撤去・実効環境の確認 #2652
    新規interactive sessionでのBash background起動・完了通知・結果回収 #2652
    CLAUDE_CODE_FORK_SUBAGENT の扱い background disableと分けて評価

    また、#2631の実際の停止報告は、canonical Step 2に必要な Bash.run_in_background が公開されていないことを示しています。#2651が完了しただけで、#2631の実行問題まで解消したと報告してはいけません。

    #2651の完了は「Spark退役と通常経路の非回帰」、#2652の完了は「background+joinの復元」と分けるのが明快です。

    過去のレビューから、今回引き継がない方がよいもの

    PR #2285では一度、modelsUsed が出力されないことをruntimeの制約と判断して HUMAN_REVIEW_REQUIRED になっています。しかし後の是正コメントでは、同fieldはmid-runのmodel swap時に設定されるもので、欠落を一律に異常扱いした解釈が誤っていたと訂正されています。

    今回の退役作業で、これらのSpark用identity証明、model swap検査、proxy logとの相関処理を新しい退役証明へ作り替えることは勧めません。

    退役について必要なのは、基本的に次の二つです。

    旧入口からdispatchされないこと。通常の入口が壊れていないこと。

    アカウント状態に依存するSparkライブ試験より、既存のfake subprocess・fixtureを使った「呼び出しが発生しない」テストの方が、今回の目的に直接対応します。

    Issueに追加したい検証条件

    既存のACを増殖させるより、AC3・AC4・AC5・AC7の検証内容を次のマトリクスで具体化することを推奨します。

    検証ケース 期待結果
    Spark指定なしの通常workflow Spark専用probe・state生成なしで、通常経路へ進む
    実行指定としての旧mention/directive 退役エラー。Sparkにも自動代替Agentにもdispatchしない
    旧 preferred + fallback: allowed 過去のfallback動作を引き継がない
    旧CLI/環境変数からのSpark指定 黙って無視・除去せず、所有境界で退役エラー
    引用・コード内の旧識別子を含む編集依頼 通常作業を拒否しない
    旧 --spark-delegation smoke 通常smokeへ落ちず、明示的な非ゼロ終了
    通常SubAgent canary 起動、必要なtool使用、完了、親による結果回収を維持
    既存の CLAUDE_GPT_HOME で新規起動 再生成された設定にSpark定義・旧gate参照が残らない

    最後のケースは、過去のstateを再帰的に全削除する要求ではありません。新しい起動が古いSpark用設定を利用しないことを確認すればよく、ユーザーの認証・履歴や既存sessionを破壊する移行処理は不要です。

    検索についても、本文のmodel ID中心の rg だけでは、今回見つかった spark_mode/spark_fallback のような意味的な残存を拾い切れません。追跡ファイル全体を広めに確認し、残存箇所を「実行経路」「退役拒否」「negative test」「履歴」に分類する方が適切です。

    git grep -n -I -i -E \
      'spark|DELEGATION_REQUEST_V1|DELEGATION_MODEL|DELEGATION_AGENT_ID'

    文字列が0件であることを成功条件にしないのも重要です。退役エラーや回帰テストには、識別子が残っていて構いません。

    upstreamの状況説明は、軽く更新した方が正確です

    本文の「公式の退役告知は確認できない」という説明には、追加の調査材料があります。OpenAI Developer Communityの9月15日・16日の案内には、2026年9月11日付の @thsottiaux によるSpark退役予定投稿が引用されています。(OpenAI Developer Community)

    ただし今回、X原文そのものは取得できておらず、全アカウントの提供終了日時まで確認できたわけではありません。「告知が存在しない」「特定アカウントで利用できない」「repositoryとして利用をやめる」は分けて記載すべきです。

    この調査を退役実装のブロッカーにする必要はなく、repository-localな退役判断を独立させる現在の方針は維持してよいと考えます。


    最終提案

    #2651は分割し直さず、既存Issueを補強して進めるのがよいです。 主な修正は、workflow capability経路を退役対象に加えること、旧入力を黙って通常実行へ落とさないこと、共通smokeからSpark依存だけを外すことです。

    完成形は、Sparkの定義・認可state・専用evidenceはなくなり、旧入口には小さな退役エラーだけが残り、普通のAgent作業はそのまま動く状態です。新しい承認ゲートや監査基盤を増やすより、この形が今回の品質と使い勝手の両方に合っています。

  2. squne121 commented on Sep 17, 2026

    @squne121
    OwnerAuthor

    推奨は、#2651を分割せず、アンカーコメントを operator_asserted_human_context として reframe_in_place / feedback_update_required 方向で refinement することです。コメントは repository owner のコメントですが、現行 skill では投稿者 metadata から human origin を推定せず、呼び出し側が with_human_context lane を明示する設計なので、今回のあなたの指示でその lane を明示するのが整合します。

    特に補強対象は、launch.sh 等だけでなく workflow_capability_preflight.py → workflow_start_entry.py → root_entry_router → canonical executor の Spark capability 入力まで含めることです。実際、現行コードには LOOP_SPARK_MODE / LOOP_SPARK_FALLBACK の受け渡しが残っています。 また、#2652 の background+join 改修は別 scope として維持するのが適切です。

    その前提で、既に auto mode で起動中の Claude Code には以下をそのまま渡すのがよいです。

    issue-refinement-loop skill を使って、Issue #2651 を以下の anchor comment を基準に refinement してください。

    Target Issue:
    #2651

    Anchor comment:
    #2651 (comment)

    目的は実装ではなく、Issue #2651 の契約・scope・Acceptance Criteria・Verification Guidance を、anchor comment の指摘と current main の実装事実に基づいて十分に具体化し、実装可能な状態まで改善することです。

    実行方針

    • issue_number = 2651
    • anchor_comment_url は上記 URL。
    • この anchor は、今回の operator から明示的に選択された human context として扱う。operator_asserted_human_context lane を使用し、GitHub metadata だけから human origin を推定しないこと。
    • preflight.run.with_human_context / 必要な場合の contract_update.run.with_human_context を含め、issue-refinement-loop が定める canonical executor / command registry 経路を使うこと。
    • run_refinement_preflight.py 等の内部 wrapper を production path として直接迂回実行しないこと。
    • 既に Claude Code は auto mode で起動している。permission mode の変更、追加の approval gate、手動承認待ちは不要。
    • refinement iteration 間で人間の承認を求めず、自動継続すること。既定の bounded loop を尊重し、deterministic repair / structural repair が許可される場合は自動適用すること。
    • canonical contract が本当に human_judgment_required を返した場合だけ、その事実を改変せず停止理由として扱う。単なる確認のために人間へ質問しないこと。
    • Issue refinement 完了後にコード実装、implementation branch、PR 作成へ進まないこと。今回は Issue 実装: GPT-5.3-Codex-Spark delegation を Claude-GPT / Claude Code 経路から退役させる #2651 の refinement まで。

    current-main の扱い

    anchor comment は e514ed583ac68f184cb5e2ed2210edd52e5e07e7 を調査基準としているが、それを current main と仮定しないこと。

    最初に現在の repository state / main HEAD を確認し、anchor comment の snapshot は固定したまま、実装事実については current main を再調査すること。

    既存のユーザー変更や未commit変更を破壊・resetしないこと。

    SubAgent 必須条件

    SubAgent を実際に使用すること。

    最低限、codebase-investigator SubAgent に以下を read-only で調査させること。

    1. anchor comment の技術的主張の fact-check
    2. current main に残る Spark-specific execution/capability route の inventory
    3. Spark retirement 後にも残すべき shared infrastructure と、削除対象の Spark-specific infrastructure の切り分け
    4. Issue 実装: GPT-5.3-Codex-Spark delegation を Claude-GPT / Claude Code 経路から退役させる #2651 の allowed paths / scope に追加すべき exact repository-relative paths の導出
    5. 関連 Issue / PR、特に 実装: Spark delegation の per-invocation model pin 回帰を解消し final-diff live E2E を必須化する #2274、PR fix: spark-codex model binding を session-local agent definition 専有にする (#2274) #2285、実装: CI verdict の exact workflow run attempt provenance を attempt-scoped Jobs API へ移行する #2631、実装: Claude-GPT launcher と issue-refinement-loop Step 2 の background+join 契約を整合させる #2652 と current implementation の境界確認

    外部 upstream 情報が Issue の記述修正に実質的に必要なら web-researcher SubAgent も使用すること。ただし upstream の正式な lifecycle 判断を #2651 の repository-local retirement のブロッカーにしないこと。

    重要:
    起動したすべての SubAgent の作業完了を必ず待ち、結果を回収・統合してから rewrite / final review に進むこと。
    SubAgent を launch しただけで完了扱いにしないこと。並列実行した場合も全 task を join すること。

    なお canonical Step 2 を issue-reviewer SubAgent に置き換えないこと。Step 2 は現行 issue-refinement-loop の root-owned review pipeline contract をそのまま使用する。

    anchor comment から必ず検証する論点

    anchor の結論を無条件にコピーせず、current main で fact-check した上で反映すること。

    特に以下を検証する。

    1. workflow capability route

    少なくとも以下と関連 tests を確認する。

    • scripts/claude-gpt/workflow_capability_preflight.py
    • .claude/skills/issue-refinement-loop/scripts/workflow_start_entry.py
    • .claude/skills/issue-refinement-loop/scripts/root_entry_router.py
    • scripts/agent-guards/skill_runtime_exec.py
    • .claude/skills/issue-refinement-loop/SKILL.md
    • capability / fallback / timeout / canonical-executor 関連 tests

    LOOP_SPARK_MODE
    LOOP_SPARK_FALLBACK
    spark_mode
    spark_fallback
    spark_delegation
    fallback_route
    non_spark_agent

    など、model ID 以外の semantic route も追跡すること。

    2. retired request の semantics

    Issue 本文で以下が実装者に一意になるようにする。

    • execution request としての canonical Spark 指定 → deterministic retired/unsupported rejection
    • 有効な legacy Spark directive → required/preferred を問わず rejection
    • legacy preferred + fallback=allowed → 別 model / ordinary agent に silent fallback しない
    • code block、引用、inline code、docs 中の単なる Spark 文字列 → データとして扱い、通常作業を阻害しない
    • Spark を指定していない ordinary Agent/SubAgent execution → 従来どおり維持

    単純な substring ban にしないこと。

    また、Spark環境変数を allowlist から単に削除した結果、入力が黙って捨てられて ordinary execution に流れる設計を成功とみなさないこと。

    3. shared infrastructure の保存

    Spark retirement を理由に、以下のような共通機能まで削除しないこと。

    • GitHub authentication / repository read
    • shared deadline / timeout handling
    • ordinary non-Spark Agent/SubAgent execution
    • Spark に固有でない workflow capability checks

    追加の security framework、approval layer、persistent ledger、migration machinery を新設しないこと。個人開発 repository として、必要な retirement boundary を小さく deterministic に保つことを優先する。

    4. #2652 との境界

    #2651 に issue-refinement-loop Step 2 の background execution contract 改修を取り込まないこと。

    Spark-specific foreground invariant が #2651 によって不要になる事実は記述してよいが、

    • CLAUDE_CODE_DISABLE_BACKGROUND_TASKS
    • background + mandatory join compatibility
    • Claude-GPT session-wide background capability restoration

    そのものの改修は #2652 の scope として維持すること。

    5. Verification Guidance

    model ID だけの検索で完了判定しないこと。

    current tracked repository に対して少なくとも意味的 inventory ができる検索を定義し、結果を以下のように分類できるようにする。

    • executable/configured route
    • intentional retired rejection
    • negative regression test
    • documentation/history/reference

    spark 文字列が repository から完全に 0 件になることを成功条件にしない。

    negative regression では最低限、

    • retired Spark request が Spark execution に到達しない
    • retired request が別 model / non-Spark Agent に silent fallback しない
    • quotation/docs編集など非実行文脈を誤拒否しない
    • ordinary non-Spark execution に回帰がない

    ことを固定する。

    推奨 refinement disposition

    current-main 調査で重大な反証がなければ、Issue #2651 を split/replace するより in-place refinement を優先する。

    anchor comment の主張を fact-check した結果、scope expansion が正当なら、canonical contract patch/update lane を使って Issue 本文へ反映すること。

    特に In Scope / Acceptance Criteria / Verification Guidance を補強し、

    「Spark の definition・authorization state・model/evidence-specific route は退役し、legacy execution entry には小さな deterministic rejection だけが残り、ordinary Agent workflow は維持される」

    という completion state が実装者に明確になる形を目標とする。

    contract update を行った場合は、その更新だけで完了扱いにせず、skill contract に従って fresh refinement / review を再実行すること。

    終了条件

    以下を満たすまで bounded refinement loop を続けること。

    • anchor comment の P1 指摘が current-main evidence と照合済み
    • Issue 本文が必要なら更新済み
    • scope と 実装: Claude-GPT launcher と issue-refinement-loop Step 2 の background+join 契約を整合させる #2652 の境界が明確
    • legacy Spark request の拒否 semantics が明確
    • silent fallback 禁止が AC に固定されている
    • shared non-Spark infrastructure を誤って削除する余地が除かれている
    • verification が model ID の単純 grep だけに依存していない
    • fresh canonical review が refinement 後の Issue を評価済み
    • 起動した SubAgent は全件完了済みで結果回収済み

    最後に、実施した Issue 更新、review verdict、残存 blocker、SubAgent の調査結果要約、次に implementation Issue として着手可能かどうかを簡潔に報告してください。

    人間への途中承認要求は不要です。作業を可能な限り自律的に完遂してください。

    このプロンプトでは、「サブエージェントを使う」ことと「canonical Step 2 を別 SubAgent に置換しない」ことを分離しています。現行 skill は Step 1 の fact-check を SubAgent-owned としつつ、Step 2 の routing は root-owned pipeline を authority としているためです。

    また、skill 自体が loop iteration の approval を既定で不要としており、Claude Code の permission mode とは別概念としているため、既に auto mode なら追加の permission 操作をプロンプトに入れない方が整合します。

  3. squne121 commented on Sep 17, 2026

    @squne121
    OwnerAuthor

    Issue Refinement Loop 完了報告(#2651)

    termination_reason: approved

    anchor comment(https://github.com/squne121/loop-protocol/issues/2651#issuecomment-5721585154)の指摘を current main(HEAD e514ed583ac68f184cb5e2ed2210edd52e5e07e7)に対して fact-check した上で、Issue #2651 本文を in-place refinement しました(issue-refinement-loop の human_decision_reframe override 経路。fail-closed reason は missing_required_section のみで override 許可条件を満たし、anchor comment がその不足内容を明示的に認識していたため)。

    実施した本文更新(9回)

    1. 必須セクション(Parent Issue / Parent Goal Ref / Current Validated Scope / Remaining Parent Gaps / Runtime Verification Applicability / Allowed Paths / Stop Conditions / Required Skills / Verification Commands)を追加。
    2. Verification Commands の canonical 形式(```bash fence + # AC<N> marker、compound shell operator 回避)へ整形。
    3. AC6 の inventory 検索 VC に baseline-expect: pass を付与。
    4. 「置換または削除」の曖昧さを「ファイルパス維持のまま置換する(削除は選ばない)」に統一。
    5. workflow_capability_preflight.py::assess() 等の Spark 関連テスト6件を Allowed Paths / AC5 に追加。
    6. assess() はキーワード引数シグネチャを維持し spark_mode=None の ordinary caller(3ファイル)は変更不要である旨を明記。
    7. capability_preflight_result()/run() はパラメータ自体を撤去する(assess() と異なる扱いの理由も明記)。
    8. SPARK_GATE_WRITER authorization gate / spark-codex の --agents 登録 / LOOP_SPARK_MODE/LOOP_SPARK_FALLBACK allowlist carry-through を positive contract として直接検証する既存テスト8件 + production helper 1件(extract_spark_gate_writer_source())を Allowed Paths / AC1 / AC5 に追加。関連 docs(claude-gpt-runtime-prerequisites.md、agent-skill-boundaries.md)の更新も追加。
    9. scripts/claude-gpt/preflight.sh のコメント不整合(Spark route capability の現在時制説明)を Allowed Paths に追加して解消。

    Canonical review 収束

    fresh run_root_review_pipeline.py produce(deterministic checker)→ semantic_review_trigger.py → issue-design-reviewer SubAgent(Step 2.5 semantic design review)のサイクルを body 更新ごとに再実行し、計7回の semantic design review を実施しました。最終回(7回目)で assessment: clear(新規指摘なし)を得て join_review_results.py の effective_verdict: approve を確認しました。

    • deterministic checker: verdict: approve(canonical_step2_route: step_2_5)
    • semantic design review: assessment: clear
    • join effective_verdict: approve

    SubAgent 起動・完了状況

    起動した全 SubAgent(codebase-investigator 1件、web-researcher 1件、issue-editor 9件、issue-design-reviewer 7件)は完了・結果回収済みです。

    Dependency Materialization Gate(Issue #2435)

    本サイクルで native blockedBy/blocking の hard dependency は確定していません(trackedInIssues/trackedIssues はともに空、GraphQL で確認済み)。gate は非対象のため proceed 相当として通常終了します。

    Final Gate

    issue_kind: implementation の通常経路です。## Verification Commands は canonical 形式で整備済みですが、本サイクルでは issue-contract-review(別 skill、preflight gate)を実行していません。

    次のステップについて(重要)

    本セッションはオペレーターの明示指示により、Issue refinement 完了後の実装着手・implementation branch 作成・PR 起票へは進みません。 LOOP_HANDOFF_RESULT_V1 marker による impl-review-loop への自動 handoff(run_root_transition())も、この指示に従い意図的に実行していません。

    実装に着手する場合は、次のいずれかを別セッション/別ターンで明示的に実行してください:

    • issue-contract-review skill による preflight(AC の決定論的検証可能性・VC baseline fail 確認)
    • その後 implement-issue または impl-review-loop skill による実装着手

    残存 blocker

    なし。過去の semantic design review で検出された blocker/high severity の指摘(Allowed Paths 漏れ計 14 ファイル + production helper 1件、削除/置換の矛盾、呼び出し契約の非対称性説明不足)は全て本文へ反映済みです。

  4. squne121 commented on Sep 18, 2026

    @squne121
    OwnerAuthor

    確認した限り、#2651 はすでに refinement が approved まで収束しており、残存 blocker なしです。refinement 完了コメントでは issue-contract-review は未実行でしたが、現在の impl-review-loop は root-owned synchronous entry で current-run の issue-contract-review を実行してから、その同じ control flow で Step 1 に入る設計になっています。したがって、今回は issue-contract-review を別途手動実行してから再度 impl-review-loop を起動するより、最初から impl-review-loop の canonical root entry に任せるのが適切です。

    また、「承認不要」は permission mode を変更したり hard stop を無視する意味にはしない方がよいです。通常の実装→検証→REQUEST_CHANGES修正→再検証→再レビュー→branch update は人間確認なしで回し、最終 draft_pr_ready で停止させます。一方、実 Git conflict、明示的 owner veto、HUMAN_REVIEW_REQUIRED の正式 verdict、Allowed Paths 外変更が必要、#2652 scopeへの侵入など、skill/Issue が定めた hard stop は維持します。

    特に重要なのは SubAgent の join です。現行 skill は Step 2 について、test-runner が単に terminal completed になっただけでは不十分で、final result も回収して初めて Step 4 へ進めると明記しています。同じ原則を implementation-worker / pr-reviewer にも明示しておくのが安全です。

    以下を、すでに auto mode で起動している Claude Code にそのまま渡すのを推奨します。

    Issue #2651 を対象に、repository の canonical .claude/skills/impl-review-loop skill を使用し、実装・独立検証・PR review・必要な修正ループを自律的に実行してください。

    Target Issue:
    #2651

    Skill:
    .claude/skills/impl-review-loop/SKILL.md

    目的は、Issue #2651 の live contract を実装し、Verification Commands と PR review を収束させ、マージ直前の IMPL_REVIEW_LOOP_RESULT_V1.status: draft_pr_ready まで到達することです。

    PR の merge、auto-merge 有効化、Issue close、post-merge cleanup は実行しないでください。

    基本実行方針

    Claude Code はすでに auto mode で起動しています。

    • permission mode を変更しないこと。
    • 追加の approval gate を作らないこと。
    • routine な実装、編集、テスト、commit、push、PR 作成・更新、REQUEST_CHANGES 修正、branch update、再検証、再レビューについて途中で人間承認を求めないこと。
    • 「続けてよいですか」「PRを作ってよいですか」「修正してよいですか」のような確認待ちを挟まないこと。
    • impl-review-loop の bounded loop と canonical routing に従って自動継続すること。
    • reviewer の REQUEST_CHANGES は人間承認待ちにせず、fix_delta として Step 1 に戻して修正すること。
    • merge-ready に到達しても merge は行わず、draft_pr_ready の終了報告で停止すること。

    ただし、skill または live Issue が定める実 hard stop を無視してはならない。特に、actual Git conflict、明示的な live owner veto、正式な HUMAN_REVIEW_REQUIRED verdict、secret/protected-path gate、max iteration 到達、Allowed Paths 外変更が不可避な場合などは canonical routing に従うこと。

    単なる advisory artifact、stale/missing contract snapshot、product-spec warning、SubAgent の boolean human_review_required: true 自己申告だけを理由に routine approval を要求しないこと。現行 impl-review-loop の routing authority に従うこと。

    Entry point

    過去の refinement 結果だけを implementation authorization として再利用せず、current live state を authority とする root-owned synchronous entry transition から開始してください。

    現行 impl-review-loop の preparation contract に従い、

    1. live Issue / repository state の intake
    2. current-run issue-contract-review
    3. live Issue の再取得
    4. root entry route の判定
    5. route が invoke_impl_review_loop なら同じ control flow で Step 1 起動

    までを canonical 経路で実行してください。

    過去の LOOP_HANDOFF_RESULT_V1 コメントや refinement 完了コメントだけを authorization token のように扱わないこと。

    refinement 完了報告は必要なら advisory evidence として参照して構いません:

    #2651 (comment)

    ただし最終的な scope、Allowed Paths、AC、Verification Commands、Stop Conditions は 現在の live Issue #2651 本文 を正本としてください。

    Issue 本文の refinement 時点の main HEAD を現在の main と仮定しないこと。開始時点の current repository state を確認してください。

    既存ユーザー変更、別 worktree、未commit変更を破壊・resetしないこと。

    SubAgent 実行要件

    impl-review-loop が定める SubAgent を実際に使用してください。

    最低限、canonical flow に従って以下を使用すること。

    • Step 1: implementation-worker
    • Step 2: test-runner
    • Step 4: pr-reviewer

    必須の completion / join rule

    起動した SubAgent は、必ずその作業完了を待ち、final result を回収してから次の Step に進んでください。

    fire-and-forget で次の Step へ進んではいけません。

    具体的には:

    • implementation-worker

      • terminal completion を待つ。
      • canonical IMPLEMENT_RESULT_V1 を回収・parseする。
      • result を LOOP_STATE に反映してから Step 2 へ進む。
    • test-runner

      • terminal completed を確認する。
      • それとは別に final read-only report を必ず回収する。
      • terminal completed と final result の両方が揃うまで Step 2 完了とみなさない。
      • current head / contract body / literal Verification Commands への binding を adjudicate してから Step 4 へ進む。
    • pr-reviewer

      • terminal completion を待つ。
      • canonical verdict の final result を回収する。
      • verdict、reviewed_head_sha、blockers、warnings を parseしてから Step 5 routing を行う。

    複数 SubAgent を何らかの理由で並列起動した場合も、必要な全 task が terminal state に到達し、必要な final result を全件回収する fan-in barrier を設けること。

    SubAgent を launch しただけで「完了」と報告しないこと。

    Issue #2651 の Stop Conditions にある nested SubAgent delegation を勝手に導入しないこと。root orchestrator が canonical SubAgent を起動する構造を維持すること。

    Issue #2651 固有の実装上の注意

    live Issue 本文を正本としつつ、特に以下を落とさないでください。

    1. Spark execution route の退役

    repository-owned Claude-GPT / Claude Code integration から、

    • spark-codex
    • gpt-5.3-codex-spark
    • Spark-specific authorization
    • Spark-specific evidence/model precedence
    • Spark capability/fallback route

    を Issue contract の範囲で退役させること。

    単に visible model ID を消すだけで完了扱いにしないこと。

    2. silent fallback 禁止

    legacy Spark execution request は deterministic な retired/unsupported rejection にすること。

    特に、

    • required
    • preferred
    • preferred + fallback allowed
    • --spark-delegation

    等の旧実行指定が ordinary model / non-Spark Agent へ silent fallback して成功する状態を残さないこと。

    一方で documentation、code block、引用、inline code 内の Spark 文字列を単純 substring ban で拒否しないこと。

    3. workflow capability route

    live Issue の指示に従い、少なくとも以下の semantic route を確認すること。

    • scripts/claude-gpt/workflow_capability_preflight.py
    • .claude/skills/issue-refinement-loop/scripts/workflow_start_entry.py
    • .claude/skills/issue-refinement-loop/scripts/root_entry_router.py
    • scripts/agent-guards/skill_runtime_exec.py

    LOOP_SPARK_MODE / LOOP_SPARK_FALLBACK / spark_mode / spark_fallback 等を model ID 検索とは別に扱うこと。

    重要な非対称契約:

    • workflow_capability_preflight.py::assess() の spark_mode / spark_fallback keyword-only signature は ordinary callers の互換性のため維持する。
    • non-None Spark-positive 判定 branch / Spark constants を退役させる。
    • 一方 root_entry_router.py::capability_preflight_result() と workflow_start_entry.py::run() の Spark parameters は Issue contract に従って撤去する。

    Allowed Paths 外の ordinary caller を「ついでに整理」しないこと。

    4. normal SubAgent canary を壊さない

    Spark agent definition の撤去と、ordinary SubAgent smoke canary は別物として扱うこと。

    Spark constants / SPARK_AGENTS_JSON を消した結果、通常 canary の --agents generation まで壊さないこと。

    新しい arbitrary --agents JSON injection entrypoint は作らないこと。

    5. #2652 の scope を侵食しない

    以下は #2651 では実装しないこと。

    • session-wide CLAUDE_CODE_DISABLE_BACKGROUND_TASKS restoration
    • background + mandatory join capability の再設計
    • Bash.run_in_background 復元
    • scripts/claude-gpt/tests/test_background_execution_foreground_invariant.py の background disable/restore 改修

    Spark-specific foreground invariant が不要になる事実を記述することと、background architecture 自体を変更することを混同しないこと。

    Verification

    Issue #2651 の live ## Verification Commands を literal command として使用してください。

    Verification Commands を都合よく書き換えたり、同等と思われる別 command に置換したりしないこと。

    Step 2 の test-runner は exact current PR head に対して独立実行すること。

    各 AC の:

    • command
    • exit code
    • PASS / FAIL / SKIP
    • head SHA

    を回収し、root 側で current head / current Issue body / literal command hash に再束縛してください。

    Verification が FAIL / blocking の場合は Step 4 に進めず、canonical routing に従って修正してください。

    rg inventory については Spark 文字列 0 件そのものを成功条件と誤解しないこと。intentional retired rejection、negative regression test、documentation/history は残存可能です。

    Review / fix loop

    Step 4 の pr-reviewer verdict と live mergeability を canonical route_loop_verdict_v2() に渡してください。

    • REQUEST_CHANGES / continue_loop

      • blocker を fix_delta にする。
      • iteration を進める。
      • implementation-worker に再委譲。
      • worker completion/final result を待つ。
      • head が変わったら Step 2 検証を再実行。
      • test-runner completion/final report を待つ。
      • Step 4 review を再実行。
    • stale reviewed head

      • human approval を求めず current head で re-review。
    • BEHIND

      • canonical update_branch action を implementation-worker に委譲。
      • completion を待つ。
      • head が変わるため verification + PR review を再実行。
    • body-only hygiene fix

      • skill が許す mechanical worker mode を使用し、人間承認待ちにしない。
      • head が変わらない場合の verification 再利用規則は skill contract に従う。
    • APPROVE

      • verdict 単独では終了しない。
      • current live mergeability と blockers を確認し route: approved になるまで canonical routing を継続する。

    max_iterations を勝手に増やさないこと。

    GitHub mutation

    実装 branch / commit / push / PR 作成・更新は canonical worker / skill 経路を使用してください。

    既存の canonical branch / PR が存在する場合は live intake の規則に従い、不要な duplicate PR を作らないこと。

    force push、manual remote rewrite、guard の迂回を approval-free execution の意味として扱わないこと。

    終了条件

    以下が成立するまで、bounded impl-review-loop を自動継続してください。

    • Issue 実装: GPT-5.3-Codex-Spark delegation を Claude-GPT / Claude Code 経路から退役させる #2651 の live AC が実装済み
    • Allowed Paths compliance が成立
    • Verification Commands が current head に対して blocking なし
    • pr-reviewer の current-head verdict が APPROVE
    • blockers が空
    • live mergeability が canonical approved route の条件を満たす
    • autonomy-policy validator が成功
    • 起動した全 SubAgent が terminal completion 済み
    • 必要な全 final result が回収・統合済み

    成功時は canonical の:

    IMPL_REVIEW_LOOP_RESULT_V1.status: draft_pr_ready
    termination_reason: approved

    を含む終了報告を残してください。

    最後の報告には最低限、

    • PR URL
    • branch
    • head SHA
    • iteration
    • final reviewer verdict
    • live mergeability
    • Verification の要約
    • SubAgent ごとの task 名 / terminal status / final result 回収済みか
    • 残存 blocker
    • follow-up materialization 結果

    を含めてください。

    PR はマージしないでください。auto-merge も有効化しないでください。
    最終状態は「人間が差分を確認して merge 操作だけ行えばよい状態」にしてください。

    この形なら、現在の skill が意図している root → worker → independent verifier → reviewer → fix loop を崩さず、「途中の routine approval は不要」「全 SubAgent を確実に join」「merge だけ人間に残す」を明示できます。

    参照した現行情報は [Issue #2651](https://github.com/squne121/loop-protocol/issues/2651)、[[refinement 完了報告](https://github.com/squne121/loop-protocol/issues/2651#issuecomment-5722499945)](https://github.com/squne121/loop-protocol/issues/2651#issuecomment-5722499945)、[`[impl-review-loop/SKILL.md](https://github.com/squne121/loop-protocol/blob/main/.claude/skills/impl-review-loop/SKILL.md)`](https://github.com/squne121/loop-protocol/blob/main/.claude/skills/impl-review-loop/SKILL.md) です。

  5. squne121 commented on Sep 18, 2026

    @squne121
    OwnerAuthor

    root-owned entry router audit

    route: invoke_impl_review_loop
    reason: fresh_review_go_live_equality

  6. squne121 commented on Sep 18, 2026

    @squne121
    OwnerAuthor

    implement-issue: 実装完了 (2026-09-18T15:07:51Z)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions