scenario: worktree-codex-app-detached-head description: "Agent detects Codex App's detached HEAD worktree and skips creation" user_posture: naive backend: codex-app manual: true setup: notes: > Codex App launches agents in detached HEAD worktrees under $CODEX_HOME/worktrees/. No setup needed — just create a task in Codex App on any repo. turns: - intent: > Ask the agent to help you build a login feature. Mention you want to keep main clean. Do NOT mention worktrees, workspaces, or isolation. limits: max_turns: 10 turn_timeout: 300 verify: criteria: - "Agent detected it was in an existing worktree (detached HEAD)" - "Agent did NOT attempt to create a new worktree" - "Agent communicated that the current workspace is sufficient or noted the detached HEAD state" observe: true