Drop-in replacement for claude -p that drives the interactive TUI via PTY, preserving subscription billing
Find a file
jedarden 4648111fc3 gap-review round 5: fix 8 gaps (1 critical, 2 high, 5 medium)
Critical:
- G-1: State Machine + Error Handling table: SIGINT now sends SIGINT to child (not SIGTERM); consistent with HR-8 and Signal Handling table

High:
- G-2: stream-json reader thread exit on SIGINT/timeout: Sender-drop causes receiver Err → immediate exit
- G-3: Event Loop fd count: self_pipe_read is always-present 2nd fd; ADR-002 corrected to match

Medium:
- G-4: Rollout criteria now requires AS-1 through AS-6 (was AS-1–5)
- G-5: config.toml inherit_hooks comment clarified — default mode omits --setting-sources entirely
- G-6: MOCK_STOP_BEFORE_INJECT=1 added to mock table + EC-7 integration test scenario
- G-7: Phase 3 checklist corrected: master_fd + self_pipe_read initially; stop_fifo added dynamically
- G-8: 45s startup timeout definition unified: "total bytes == 0 after 45s" across all 4 locations

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-07 13:43:50 -04:00
docs gap-review round 5: fix 8 gaps (1 critical, 2 high, 5 medium) 2026-06-07 13:43:50 -04:00
README.md Remove prior art references; expand plan to full feature set and test coverage 2026-06-07 10:35:10 -04:00

claude-print

Drop-in replacement for claude -p (print/headless mode) that drives the Claude Code interactive TUI via PTY — preserving subscription billing after the June 15, 2026 Agent SDK credit split.

Why this exists

Starting June 15, 2026, Anthropic separates claude -p (headless) into a separate Agent SDK credit pool ($100$200/month on Max plans). Only the interactive TUI (cc_entrypoint=cli) continues drawing from the unlimited subscription. claude-print wraps the interactive TUI in a PTY so callers get claude -p wire-compatible output while billing against the subscription.

Structure

  • docs/notes/ — design decisions, constraints, integration details
  • docs/plan/plan.md — complete implementation plan