Skip to content

Claude Code Agent adapter #52

Description

@maxBRT

Parent

What to build

A Run with agent: claude (or --agent claude) executes every Phase through Claude Code print mode: skip-permissions for unattended edits/shell, full project context (no --bare), no --worktree, ephemeral / no-session-persistence, opaque model pass-through, Ship-owned timeout, exit 0 plus stream-json terminal result/success, and curated observability events into the same sink Cursor already uses. Factory recognizes claude and resolves the default claude binary on PATH.

Acceptance criteria

  • agent: claude / --agent claude constructs the Claude Port via the agent factory and uses PATH binary claude
  • Each Phase spawns a fresh claude -p with skip-permissions, --no-session-persistence, and stream-json (plus verbose as required for that format)
  • Never passes --bare, --worktree, --resume, or --continue
  • Phase prompt is passed via stdin; working directory is the Phase workspace
  • Optional model is passed through unchanged; empty model omits the model flag
  • Phase timeout is enforced by Ship (context / process kill)
  • Success requires exit 0 and a terminal result with subtype=success; failures surface stderr
  • When the observability sink is non-nil, curated tool / phase_end / token events are emitted; nil sink emits nothing; no raw vendor lines or message bodies
  • Preflight fails before queue confirmation if claude is not on PATH
  • Tests use a fake executable stub only (no live Claude / network)

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified, ready for an AFK agent

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions