Drop-in replacement for claude -p that drives the interactive TUI via PTY, preserving subscription billing
Find a file
jedarden 71a4cb9f96 Implement large-prompt file relay in startup.rs (bf-1cx)
Prompts exceeding INLINE_PROMPT_MAX (32 KB) are written to a NamedTempFile
and a shell $(< path) read command is injected via bracketed paste instead
of the raw bytes, avoiding PTY pipe-buffer saturation.

Adds four unit tests: threshold boundary (inline), threshold+1 (file relay),
temp-file content verification, and end-to-end state-machine coverage.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 10:26:16 -04:00
.beads Close bead bf-54m: idle-gap timing implemented and verified 2026-06-08 10:16:57 -04:00
docs gap-review round 10: 3 gaps fixed 2026-06-07 14:24:50 -04:00
notes Close bead bf-9u4: bracketed paste injection verified complete 2026-06-08 10:17:59 -04:00
src Implement large-prompt file relay in startup.rs (bf-1cx) 2026-06-08 10:26:16 -04:00
test-fixtures/mock-claude Add mock-claude fixture, test_pty_spawns_tty integration test, and hook module export 2026-06-08 08:56:36 -04:00
tests Add startup.rs: trust-keyword scanner with test_trust_dialog_* integration tests (Phase 5) 2026-06-08 10:05:27 -04:00
Cargo.lock Add mock-claude fixture, test_pty_spawns_tty integration test, and hook module export 2026-06-08 08:56:36 -04:00
Cargo.toml Phase 2: implement PTY open and fork in pty.rs 2026-06-07 16:38:14 -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