Part of #125. Experimental (Track B) — optional, behind a config flag.
Problem
The JSONL+hook layer is a bridge over PTY sessions. The Agent SDK offers natively structured sessions (canUseTool for permissions, typed message stream). The CodeBackend interface (backend/src/backends/types.ts:85-166) is backend-agnostic — validate that an SDK-based backend can slot in.
Outcome
A HeadlessBackend implementing CodeBackend via @anthropic-ai/claude-agent-sdk: plain-text task:output, canUseTool → task:prompt, resume support — created per-task behind a config flag.
Acceptance criteria
Scope & expectations
- Where: new
backend/src/backends/headless-backend.ts, config-store flag
- Constraints: SDK is pre-1.0 — pin the version; no changes to
CodeBackend interface without discussion
How to verify
CLI — test-cli session transcript on the SDK backend including a structured permission answer.
Part of #125. Experimental (Track B) — optional, behind a config flag.
Problem
The JSONL+hook layer is a bridge over PTY sessions. The Agent SDK offers natively structured sessions (
canUseToolfor permissions, typed message stream). TheCodeBackendinterface (backend/src/backends/types.ts:85-166) is backend-agnostic — validate that an SDK-based backend can slot in.Outcome
A
HeadlessBackendimplementingCodeBackendvia@anthropic-ai/claude-agent-sdk: plain-texttask:output,canUseTool→task:prompt, resume support — created per-task behind a config flag.Acceptance criteria
resizeTaskno-ops cleanly; state lifecycle maps correctlyScope & expectations
backend/src/backends/headless-backend.ts, config-store flagCodeBackendinterface without discussionHow to verify
CLI — test-cli session transcript on the SDK backend including a structured permission answer.