Skip to content

実装: Claude-GPT launcherの明示permission bypass拒否を解除しAgent Viewで利用可能にする #3053

Open

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "ユーザー指示に基づきClaude-GPTの明示選択されたbypassPermissionsを正規launcherから利用できるようにし、Agent Viewでauto classifierによる操作拒否・都度permission確認を回避する"
change_kind: mixed
dedupe_key: "claude-gpt:explicit-permission-bypass-pass-through:v1"

Parent Issue

none。発見・運用判断元: #3052 の実機調査(A、B、統合)。

Parent Goal Ref

Current Validated Scope

  • 2026-10-13時点の scripts/claude-gpt/launch.sh は lines 104–122 で --dangerously-skip-permissions / --allow-dangerously-skip-permissions / --permission-mode bypassPermissions / --permission-mode=bypassPermissions を permission_bypass_flag_rejected として拒否する。
  • scripts/claude-gpt/tests/test_minimal_default_contract.py::test_default_env_contract_never_enables_permission_bypass は、その拒否をfixtureで保証している。現行 test_default_env_contract_exact_added_env_and_no_injected_flags は「普通の起動ではpermissionを自動注入しない」minimal launcher invariantを保証する。
  • Claude Code公式 https://code.claude.com/docs/en/agent-view / https://code.claude.com/docs/en/permissions / https://code.claude.com/docs/en/cli-reference は claude agents --permission-mode bypassPermissions および --dangerously-skip-permissions を提供する。バックグラウンド用の初回disclaimer承諾と対象repoのworkspace trustは別途必要であり、bypassPermissionsはGitHub/proxy認証を不要にするものではない。
  • main/PR/current HEADは実装開始時に再取得し、同時変更・source driftを照合する。

Remaining Parent Gaps

Outcome

Native Claude Codeの通常起動を変えず、Claude-GPTの正規launcherが、operatorの明示CLI引数で指定した bypassPermissions を原形のままClaude Codeへ渡せる。OperatorはClaude-GPT Agent Viewを1回 --permission-mode bypassPermissions で起動するだけで、dispatch先の許可モードを選べる。Auto classifierに頼らない。launcherの既定動作はpermission flag無注入の薄いwrapperとして維持する。別repoのtrust/proxy/実worktreeは #3052 で別途実証する。

Runtime Verification Applicability

decision: immediate
applicable_acs: [AC3]
runtime_assertion_bindings:
  - profile: claude-gpt-process-io-smoke
    assertion: external_process_exit_code_and_stdio_observed
    ac: AC3
    disposition: dispositive
reason: "実際のClaude-GPT Agent Viewが明示bypass modeを利用し、子に受け渡せるかはlive runtimeでしか確証できない"
execution_environment: "ユーザー所有のClaude-GPT / Agent View / trusted disposable repository。モデル/接続先の正規profileは現行launcherから導出"
skip_conditions: "Claude Code/Agent View/proxyの実機が利用不可、disclaimer/trustが取得できない、既存worktreeへの影響を隔離できない場合"
fallback_policy: "fake claudeのargv test、Native Claude、静的確認だけをAC3のPASSにしない"
artifact_requirements: "正規launcher起動コマンド・exit/status・子sessionのobserved modeとLLM応答・backend根拠・secret-free summaryをIssue/PRへ投稿"

In Scope

  1. scripts/claude-gpt/launch.sh の明示bypass flag拒否だけを取り除く。既存 -- 以降のargvを変更・注入せずそのまま exec "$CLAUDE_BIN" "$@" へ透過する。launcherを新規permission policyのauthorityにしない。
  2. scripts/claude-gpt/tests/test_minimal_default_contract.py の拒否前提のfixtureを反転し、fake Claudeで上記4形式の引数が正確に届くpositive testを追加する。未指定時の無注入、HOME/credentials/other ambient envの保持、--check-only / --dry-runの非破壊、既存Native経路への影響なしも回帰で検証する。既存CLI arg validationを意図せず壊さない。
  3. docs/dev/claude-gpt-runtime-prerequisites.md と、旧拒否説明が残る docs/dev/agent-skill-boundaries.md / .claude/skills/worktree-agent-runtime-smoke/references/claude-code.md を最小更新し、launch.sh -- agents --permission-mode bypassPermissions の正規用法、初回disclaimer、workspace/directory単位のtrust、Nativeは従来通りであることを明記する。新launcher/profile/permission gateは追加しない。
  4. 可能な場合、所有したdisposable Git repo / Agent Viewでreal bypass modeの初期化と子の実短応答を検証する。trustは当該fixtureのみに拡大することをユーザーは許可済み。認証文字列・raw transcriptは公開しない。

Out of Scope

  • ~/.claude/settings.json に defaultMode: bypassPermissions を置くこと、Native Claudeのpermission defaultを変更すること、全セッションにbypassを強制注入すること。
  • GitHub/proxyの認証を無効化すること。secret guard / repo-side policy / CI / branch protection の撤去。
  • Agent Viewのgateway転送修復や impl-review-loop のworktree再設計(#3052が検証結果と後続scopeを管理)。
  • 人間の1回限りのworkspace trust / bypass disclaimer承諾を偽装・スキップすること。
  • 実運用中のforeign worktreeや他session変更、force push、実PR merge。

Acceptance Criteria

  • AC1: 正規launcherは上記4つのClaude Code permission flag形式を、fake claude へ変更なしに渡す(拒否0)。-- の前に書いた未知のlauncher optionは従来どおり拒否する。
  • AC2: permission flagを指定しない既存のClaude-GPT launcher動作、model role routing、HOME/ambient/CLI/exit passthroughとcheck-only/dry-runが不変である。
  • AC3: 明示起動したClaude-GPT Agent Viewで初期bypass modeとdispatched child mode、および実LLM応答を記録する。実機検証不能ならSKIP/UNVERIFIEDであり、fixture PASSを代用しない。
  • AC4: operator用文書にClaude-GPT限定の正規コマンド、workspace trustとbypass disclaimerの独立性、バックエンド接続継承とは別問題であることが明記され、関連SSOT/Skillの旧bypass拒否説明も透過の現行契約へ整合している。
  • AC5: 非破壊的な検証と現行HEADのrequired CI・独立PR reviewによりlauncherの回帰なしを確認し、マージ直前で停止する。

Verification Commands

各VCは現在の実装範囲のうち機械実行可能な部分を確認する。AC3の claude agents --json --all は一覧を取得するだけで実運用の証明にならず、対応するreal dispatch / observed-mode / LLM応答の結果を別途PRに添付しなければAC3 PASSにしない。

# AC1
# preflight-scope: pr_review_only
$ uv run --locked pytest scripts/claude-gpt/tests/test_minimal_default_contract.py -q -k permission_bypass
# AC2
$ uv run --locked pytest scripts/claude-gpt/tests/test_minimal_default_contract.py -q
# AC3
# preflight-scope: runtime_only
$ claude agents --json --all
# AC4
$ rg -n "Claude-GPT Agent View の明示起動" docs/dev/claude-gpt-runtime-prerequisites.md
$ rg -n "明示した bypass flag を透過" docs/dev/agent-skill-boundaries.md
$ rg -n "明示した bypass flag を透過" .claude/skills/worktree-agent-runtime-smoke/references/claude-code.md
# AC5
$ uv run --locked pytest scripts/claude-gpt/tests/ -q

Allowed Paths

  • scripts/claude-gpt/launch.sh
  • scripts/claude-gpt/tests/test_minimal_default_contract.py
  • scripts/claude-gpt/tests/**(直接関連する回帰に限る)
  • docs/dev/claude-gpt-runtime-prerequisites.md(既存operator文書に限る)
  • docs/dev/agent-skill-boundaries.md(launcherの旧拒否説明の整合のみ)
  • .claude/skills/worktree-agent-runtime-smoke/references/claude-code.md(launcherの旧拒否説明の整合のみ)

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
  • credential/secretの公開・取得・変更、グローバルNative Claudeの権限設定変更が必要な場合。
  • foreign worktree/sessionの変更、履歴破壊、force push、実PR merge、ポリシー上の権限迂回が必要な場合。
  • 原因がbypass flag拒否ではなく別repo gateway転送と分かった場合、別Issue #3052に観測を戻す(本Issueへ拡張しない)。
  • Allowed Paths外の変更が不可避、または既存contractとの修復不能なscope conflict。

Required Skills

なし(ドメインはClaude Code CLI / Shell / pytest。workflow Skillsはcurrent repositoryの定義から適用する)。

Required Design References

Handoff / Completion

  1. impl-review-loop のcurrent規則に従い、source→test→review→fix→CIまで独立して確認。auto modeによる拒否はproduction policy迂回で隠さず、修正対象のlauncher契約として正規に変更する。
  2. 既存branch/PRがあれば再利用して重複PRを作らない。
  3. GitHub readback、実験の観測値・未検証状態を報告。merge/auto-mergeは実施しない。
  4. 調査: Claude-GPT Agent View の別リポジトリdispatchと既存Issue worktreeの互換性を実機検証する #3052 に結果と実際の使用コマンドをリンクし、A/BのUNSUPPORTEDをevidenceなしに上書きしない。

Activity

  1. added
    enhancement
    phase/implementation
    agent/implementer
    triage-required
    on Oct 13, 2026
  2. squne121 commented on Oct 13, 2026

    @squne121
    OwnerAuthor

    root-owned entry router audit

    route: stop
    reason: review_verdict_blocked

  3. squne121 commented on Oct 13, 2026

    @squne121
    OwnerAuthor

    root-owned entry router audit

    route: stop
    reason: review_verdict_blocked

  4. squne121 commented on Oct 13, 2026

    @squne121
    OwnerAuthor

    root-owned entry router audit

    route: invoke_impl_review_loop
    reason: fresh_review_go_live_equality

  5. squne121 commented on Oct 13, 2026

    @squne121
    OwnerAuthor

    実装停止(2026-10-13)

    実装前に契約のruntime assertion binding漏れとAC4のbaseline誤PASSを最小修正し、current-runのroot入口審査は invoke_impl_review_loop、main HEAD ac82972d1e62b6327227173a430862b4451a60c5、Issue本文SHA sha256:2cb0f8de8293ad427b7a3cdd3ef7c854e05b3fed6ff48a58f1879fe92488ec82 を確認。base ACの独立検証はAC1/AC2/AC5が既存仕様でPASS、AC3はAgent View実dispatch未観測、AC4は新文言が未実装なのでFAIL。既存PR/Issue worktreeなし・rootはclean、landing判定は dispatch_step1。

    implementation-worker へのStep 1委譲時、現在のClaude Code auto mode classifierが [Security Weaken] として呼び出しを拒否した。理由文はユーザー承認なしとするが、本会話のユーザーは明示bypass解除を依頼している。拒否を別ツールで迂回しないため、launcher/test/docの変更・Draft PR作成・修正後の#3052 A/B実機検証は未着手。実装済み、CI緑、runtime PASSのいずれも主張しない。作業再開にはpermission境界で当該操作が正規に許可される必要がある。

  6. squne121 commented on Oct 13, 2026

    @squne121
    OwnerAuthor

    root-owned entry router audit

    route: invoke_impl_review_loop
    reason: fresh_review_go_live_equality

  7. squne121 commented on Oct 13, 2026

    @squne121
    OwnerAuthor

    root-owned entry router audit

    route: invoke_impl_review_loop
    reason: fresh_review_go_live_equality

  8. squne121 commented on Oct 13, 2026

    @squne121
    OwnerAuthor

    implement-issue: Step 1 実装報告

    • Draft PR: fix: pass explicitly requested Claude-GPT permission mode through (#3053) #3054 (HEAD fbc266cb7f5f8c1f368f32a61c817d2eb7091108)
    • Worktree: .claude/worktrees/issue-3053-claude-gpt-launcher-permission-bypass-ag / branch worktree-issue-3053-claude-gpt-launcher-permission-bypass-ag
    • Allowed Paths: 3 ファイル、逸脱なし。4形式の明示引数を fake Claude に透過させる pytest 8 PASS、関連 pytest 264 PASS(live 2 deselected)、typecheck/lint/Vitest 1943/build PASS。
    • AC3: UNVERIFIED。Agent View の実 child mode・LLM 応答は未観測。fake の argv や claude agents --json --all を runtime PASS としていない。AC5 の required CI / 独立 review も PR 起票後に評価する。
    • 実起動用法(未実行の operator コマンド): scripts/claude-gpt/launch.sh -- agents --permission-mode bypassPermissions。初回 disclaimer と各 Git repo の trust は人間判断。gateway/別 repo の実証は 調査: Claude-GPT Agent View の別リポジトリdispatchと既存Issue worktreeの互換性を実機検証する #3052 へ返す。
    • マージ・force push は実施しない。
  9. squne121 commented on Oct 14, 2026

    @squne121
    OwnerAuthor

    root-owned entry router audit

    route: invoke_impl_review_loop
    reason: fresh_review_go_live_equality

  10. squne121 commented on Oct 14, 2026

    @squne121
    OwnerAuthor

    Scope Delta反映後の停止(2026-10-14)

    人間が二つの運用文書を同一PRに含めること、さらにテンプレ必須の Remaining Parent Gaps と標準Stop Conditions 6件の補完を承認。正規 edit_issue_txn.py のguardを通し、Issue本文を sha256:e49b3458b003a17cdbed8ac46e09a30f1552213f059c66bebd843ac74bf812e8 に更新・readback済み。PR #3054 の既存scope markerは旧本文 sha256:2cb0f8de... と旧Allowed Pathsを記録しているため、fresh build_intake_capsule.py --include-implementation-landed-evidence は reconciliation_required / open_draft_scope_ownership_not_exact、start_data_plane:false / suppress_worker_worktree_new_pr を返した。既存PRを新scopeの実装に無断再利用せず、追加二文書は未編集で停止。markerを実装済み証拠へ捏造して更新しない。

    AC3のreal bypass子起動は所有fixtureでも現在のauto modeが [Create Unsafe Agents] として拒否した。拒否後は別ツール・設定偽装による再起動なし。したがってAC3=UNVERIFIED、#3052の別repo dispatchとnative worktree移動も未観測。PR #3054はDraft、HEAD f05f7362c059ce5fddf6efd4afb79a8bc108ee22 の旧scope時点のrequired CIはPASSだが、新しいAC4二文書・AC3を満たさずterminal approvalではない。人間による正規reconciliation経路の判断と、隔離環境での実機実行が必要。merge/force pushなし。

  11. squne121 commented on Oct 14, 2026

    @squne121
    OwnerAuthor

    人間による reference 判断(A1)

    PR #3054 のマージで #3053 を close しない。AC3(Claude-GPT Agent View の実機検証)は、PR マージ後に別の Claude-GPT セッションが #3052 で実施する。実機証跡が取得されるまで #3053 は OPEN を維持する。この判断は fixture や静的確認を AC3 の PASS に代用するものではない。

    REFERENCE_DECISION_V1: nonclosing issue=#3053

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

    agent/implementerenhancementphase/implementationtriage-required

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions