Skip to content

調査: Codex spawn_agent sub-thread が agent-local permission profile を実効的に適用しているか検証する #1872

Open

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: research
parent_issue: "#1859"
goal_ref: "Codex native spawn_agent/collaboration runtime が .codex/agents/<agent>.toml の default_permissions を sub-thread sandbox へ実効的に適用しているかを検証する"
change_kind: research-only

Parent Issue

#1859

Outcome

Issue #1859 の AC4 runtime smoke(PR #1864、evidence: artifacts/codex-permission-profile-smoke/pr-1864/custom-agent-dispatch-findings.json)で、codebase-investigator(loop-protocol-readonly 宣言)と implementation-worker(loop-protocol-rtk 宣言)の両方の spawn_agent sub-thread が、各々の agent-local .codex/agents/*.toml の default_permissions ではなく root session の実効 policy(loop-protocol-personal-dev)と同一の turn_context.permission_profile を示した。この事象の原因(spawn_agent 実装の仕様上の挙動か、設定の不備か、既知の制限か)を調査し、agent-local profile が実効的に enforce されているかどうかの結論が本Issueコメントに記録され、修正が必要な場合は対応する implementation issue が起票されてlinkされる状態。

In Scope

  • Codex CLI(0.146.0 系列)の spawn_agent/collaboration runtime のソースまたは公式ドキュメントで、sub-thread sandbox に agent-local profile がどう適用される設計かを調査する
  • WSL2 sandbox subsystem の既知の破損(codex sandbox linux -- pwd が ENOENT で失敗する事象)が本発見の直接原因かどうかを切り分ける
  • 正常な sandbox subsystem を持つ環境(Linux ネイティブ等)で同じ spawn_agent dispatch smoke を再実行し、結果が変わるかを確認する
  • loop-protocol-readonly / loop-protocol-rtk 宣言が spawn_agent sub-thread に実際に反映されるべきかどうかの仕様確認

Out of Scope

Acceptance Criteria

  • AC1: spawn_agent sub-thread への agent-local profile 適用に関する Codex CLI の設計・既知issue・ドキュメントの調査結果が本Issueコメントに記録されている
  • AC2: WSL2 sandbox 破損が本発見の直接原因かどうかの切り分け結果が本Issueコメントに記録されている
  • AC3: 結論(enforce されている/されていない/不明)と、修正が必要な場合の対応 implementation issue の起票有無が本Issueコメントに記録されている

Verification Commands

# AC1
$ test -f artifacts/codex-agent-profile-enforcement-research/findings.md
# AC2
$ test -f artifacts/codex-agent-profile-enforcement-research/sandbox-isolation-check.md
# AC3
$ test -f artifacts/codex-agent-profile-enforcement-research/conclusion.md

Allowed Paths

  • artifacts/codex-agent-profile-enforcement-research/

Stop Conditions

  • Outcome / Scope / AC が検索可能な形で記載されていない場合は即停止
  • Allowed Paths 外への書き込みを試みた場合は即停止
  • 権限不足(permission denied)により操作が完了できない場合は即停止
  • 成果物の書き込みに失敗した場合(I/O エラー等)は即停止

Handoff Contract

  • Current Objective
  • Bounded Current Context
  • Open Questions
  • Next Action
  • Artifact Refs

Notes for Reviewer

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