Drop-in replacement for claude -p that drives the interactive TUI via PTY, preserving subscription billing
G-1 (CRITICAL): initial poll set corrected to 2 fds (master_fd + self_pipe_read) G-2 (HIGH): --check flag added to CLI table and Phase 9 checklist G-3 (HIGH): 45s timeout generalized to 'WAITING state ≥ 45s AND bytes < 200' G-4 (HIGH): stream-json 5s file-open timeout expiry behavior specified G-5 (MEDIUM): stream-json error result template now includes claude_version G-6 (MEDIUM): SIGCHLD reference replaced with poll+EIO+waitpid(WNOHANG) spec G-7 (MEDIUM): OQ-3 split into OQ-3a (resolved) + OQ-3b (blocks Phase 5) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| docs | ||
| README.md | ||
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 detailsdocs/plan/plan.md— complete implementation plan