For Claude Code, Codex, and other interactive AI CLIs

Run AI agents in real terminals.
Control them by API.

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.

ralphterm.local
$ 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?

A terminal session manager for AI coding agents.

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

AI CLIs are interactive. Automation has to handle that.

Prompt mode breaks

Long runs hit login screens, approval prompts, rate limits, follow-up questions, and output changes.

PTY mode survives

The official CLI keeps its real terminal. RalphTerm watches output and sends input like a controlled operator.

Runs stay auditable

Every session can expose live events, completion signals, exit status, and the raw transcript.

Current API

Small surface. Useful primitives.

RalphTerm is early, but the core shape is already there. It is the PTY layer we need before building the full plan-execution loop.

Next

From PTY sessions to autonomous plan execution.

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.