Prompt mode breaks
Long runs hit login screens, approval prompts, rate limits, follow-up questions, and output changes.
For Claude Code, Codex, and other interactive AI CLIs
RalphTerm is a local terminal-session service for AI coding agents. It starts official CLIs like Claude Code and Codex in real PTYs, streams their output, accepts input, detects signals, and stores transcripts.
Use it when AI CLIs ask questions, require approvals, hit login screens, or run too long for brittle one-shot calls like -p.
$ cargo run -- serve --bind 127.0.0.1:7878
[ready] session API listening on 127.0.0.1:7878
$ curl -X POST /v1/sessions -d '{"agent":"claude"}'
[session] started Claude Code in a real PTY
[stream] login prompts, approvals, tool output, questions
[signal] COMPLETED
[transcript] saved
What is RalphTerm?
RalphTerm does not replace Claude Code or Codex. It runs them the way a human runs them: inside a terminal. The difference is that every session gets an API: start, input, resize, cancel, status, events, and transcript.
Why it exists
Long runs hit login screens, approval prompts, rate limits, follow-up questions, and output changes.
The official CLI keeps its real terminal. RalphTerm watches output and sends input like a controlled operator.
Every session can expose live events, completion signals, exit status, and the raw transcript.
Current API
RalphTerm is early, but the core shape is already there. It is the PTY layer we need before building the full plan-execution loop.
POST /v1/sessionsstart Claude, Codex, or a custom commandPOST /v1/sessions/:id/inputsend text to the terminalGET /v1/sessions/:id/eventsstream output and lifecycle eventsGET /v1/sessions/:id/transcriptread the run logNext
The next milestone is simple: take a plan, run each task in isolated real terminal sessions, handle approvals, run review, and produce a patch plus transcript. The PTY API is the foundation for that loop.