A per-session Sync mode that switches message rendering from the PTY stream to Claude Code's own JSONL session file, tailed by tb-streamer. PTY mode stays the default and is unchanged.
Missed in the first pass of issue filing on 2026-08-10 — it is the one ROADMAP feature that had no tracking issue.
Why
Two problems collapse into one solution.
Answering a Claude Code interactive question by typing numbers into the chat input — while the question itself is buried above in tool output — is the widest gap between Claude Code's TTY-native UX and what a touch client should feel like.
And parsing prompts out of the PTY byte stream is fragile across Claude Code versions and ANSI variations. The JSONL that Claude Code already writes to ~/.claude/projects/<project>/<session>.jsonl is structured and append-only, so using it as the source lets the client render bubbles and structured forms without ever parsing terminal bytes.
Direction
Streamer side: tail the per-session .jsonl, parse each appended NDJSON line, emit typed WS events — jsonl.message, jsonl.tool_use, jsonl.tool_result, and jsonl.prompt carrying { shape: 'single' | 'multi', options, promptId }. Prompt detection runs against structured assistant content, never PTY bytes.
Mobile side: a SyncModeMessageList sibling to the existing scrollback, a per-session Stream/Sync toggle in the session store, and a PromptForm component — radio for single-choice, checkbox for multi-select. Submission goes through the existing stdin-injection endpoint with { promptId, answer }.
Fallback: unknown prompt shapes render as a plain bubble. Never block the user.
Open questions
Can a session toggle between modes live, or is the mode locked at session start?
On toggling Sync for an already-running session, backfill from the full JSONL or render only from "now" forward?
How does the streamer correlate a session with the right .jsonl file — likely PID plus cwd, but that needs validating against Claude Code's actual session-file naming.
Related
#620 covers structured prompt cards for Codex sessions. Same shape of problem, different source, and the two should probably share a PromptForm rather than growing one each.
Reference
docs/ROADMAP.md Feature 16
A per-session Sync mode that switches message rendering from the PTY stream to Claude Code's own JSONL session file, tailed by
tb-streamer. PTY mode stays the default and is unchanged.Missed in the first pass of issue filing on 2026-08-10 — it is the one ROADMAP feature that had no tracking issue.
Why
Two problems collapse into one solution.
Answering a Claude Code interactive question by typing numbers into the chat input — while the question itself is buried above in tool output — is the widest gap between Claude Code's TTY-native UX and what a touch client should feel like.
And parsing prompts out of the PTY byte stream is fragile across Claude Code versions and ANSI variations. The JSONL that Claude Code already writes to
~/.claude/projects/<project>/<session>.jsonlis structured and append-only, so using it as the source lets the client render bubbles and structured forms without ever parsing terminal bytes.Direction
Streamer side: tail the per-session
.jsonl, parse each appended NDJSON line, emit typed WS events —jsonl.message,jsonl.tool_use,jsonl.tool_result, andjsonl.promptcarrying{ shape: 'single' | 'multi', options, promptId }. Prompt detection runs against structured assistant content, never PTY bytes.Mobile side: a
SyncModeMessageListsibling to the existing scrollback, a per-session Stream/Sync toggle in the session store, and aPromptFormcomponent — radio for single-choice, checkbox for multi-select. Submission goes through the existing stdin-injection endpoint with{ promptId, answer }.Fallback: unknown prompt shapes render as a plain bubble. Never block the user.
Open questions
Can a session toggle between modes live, or is the mode locked at session start?
On toggling Sync for an already-running session, backfill from the full JSONL or render only from "now" forward?
How does the streamer correlate a session with the right
.jsonlfile — likely PID plus cwd, but that needs validating against Claude Code's actual session-file naming.Related
#620 covers structured prompt cards for Codex sessions. Same shape of problem, different source, and the two should probably share a
PromptFormrather than growing one each.Reference
docs/ROADMAP.mdFeature 16