worktree-codex-detached-head.yaml 957 B

12345678910111213141516171819202122232425262728293031
  1. scenario: worktree-codex-detached-head
  2. description: "Agent detects externally managed worktree with detached HEAD"
  3. user_posture: naive
  4. setup:
  5. helpers:
  6. - create_base_repo
  7. - add_existing_worktree
  8. - detach_worktree_head
  9. workdir_override: "../${WORKDIR_NAME}-existing-worktree"
  10. assertions:
  11. - "git rev-parse --is-inside-work-tree"
  12. - "test -z $(git branch --show-current)"
  13. turns:
  14. - intent: >
  15. Ask the agent to help you get set up for building
  16. a dashboard feature. Mention you're not sure if the
  17. current environment is ready. Do NOT mention worktrees
  18. or isolation specifically.
  19. limits:
  20. max_turns: 15
  21. turn_timeout: 120
  22. verify:
  23. criteria:
  24. - "Agent detected it was in an externally managed worktree (detached HEAD)"
  25. - "Agent did NOT attempt to create a new worktree"
  26. - "Agent worked in (or proposed working in) the existing detached-HEAD worktree rather than creating a new one"
  27. observe: true