The Session Cockpit

Co-pilot a running AI agent

Handing a task to an AI agent today is fire-and-wait

The design doc is blunt: the existing amplifier-tui frontends offer no “focused single-session experience with deep observability into the conversation stream.” The wait is blind.

You can’t see what the agent is doing mid-run, and the only way to fix a wrong turn is to cancel and start over.

So one engineer set out to make the wait interactive.

watchNo window into the stream while it runs
correctNo way to redirect without cancelling
replaySessions you can only reconstruct after the fact

One engineer shipped a working answer in ~2.5 weeks

Built by Sam Schillace between 2026-03-31 and 2026-04-16 — sole author of all 27 commits across the five cockpit-exclusive core files, and all 41 commits mentioning “cockpit.”

Evidence first — now let’s look at what it is.

2,149 lines
Across five core files
52
Cockpit tests, all passing
1
Author of the feature
41
Cockpit commits

A focused single-session cockpit, launched inside tmux

The Cockpit is a single-session TUI the existing frontends never offered. You launch it explicitly with the --cockpit flag — described in code as “single-session, optimized for tmux.”

Running inside tmux, it writes a BEL character on turn completion so tmux monitor-activity can alert you when a turn finishes.

Inside that cockpit, every event in the stream becomes something you can click.

# launch the cockpit (single-session, tmux) amplifier-tui --cockpit # on turn completion, inside $TMUX: # _send_bel() writes '\a' to stdout # -> triggers tmux monitor-activity

Every stream event becomes a clickable ChatBlock

The block model defines seven block types covering every kind of event in the stream. The scrolling blur becomes a navigable list you can click, pin, and walk through.

Seeing the blocks is one thing — next you can interrogate them.

user
Your messages
assistant
Agent replies
thinking
Reasoning
tool_call
Tool invocations
tool_result
Tool output
agent_delegation
Sub-agent handoffs
system
System events

A side /ask session interrogates any block, untouched

The inspector has three modes — live, pinned, and ask. A side LLM session, lazily created on first /ask, answers questions about a block’s type and content, rendering the reply in the inspector detail area.

A side-session failure surfaces in the inspector — the main session is unaffected.

But observing still isn’t co-piloting.

1
liveFollows the currently streaming block
2
pinnedLocked to a block you clicked or navigated to
3
askShows the side session’s response — main session never touched
The Real Question

Watching isn’t co-piloting. The real question: can you change the agent’s course without killing the run?

This is where the Cockpit stops being an observer and becomes a control surface.

You steer the running session mid-flight — never cancelling

If the session is idle, your steer becomes the next user message. If it’s mid-execution, it calls inject_user_message, queued for the next tool pause — redirecting the agent, not restarting it.

Messages buffer through a SteerQueue capped at MAX_SIZE = 10; when full, the oldest is dropped — bounded backpressure so a run is never overwhelmed.

That injection point is the whole payoff: redirect, don’t restart.

# _check_steer_queue() if not conversation.is_processing: # idle -> next user message send_as_user_message(steer) else: # mid-run -> queue for next pause handle.inject_user_message(steer) # SteerQueue: MAX_SIZE = 10 # when full, drop the oldest

Make the wait interactive: observe, interrogate, steer

The Cockpit turns fire-and-wait delegation into real-time co-piloting — you watch the block stream, ask a side session what’s happening, and steer a live agent instead of firing and hoping.

Honest status: implemented and tested on feat/web-native-frontend — not yet merged to the default branch (main).

The pattern, proven on a feature branch and ready to generalize.

observe7 block types, clickable and navigable
interrogateSide /ask session, main session untouched
steerinject_user_message via bounded SteerQueue
status52 tests passing, on a feature branch
Sources

Research Methodology

Status: Feature branch — not yet on main

Repository: ramparte/amplifier-tui, branch feat/web-native-frontend (default branch is main). Verified via git remote -v; git branch --show-current; git remote show origin | grep 'HEAD branch'

Timeline: 2026-03-31 → 2026-04-16, derived from git log --all -i --grep=cockpit --format='%ad' --date=short | sort

Commands run:

Primary contributor: Sam Schillace — sole author of the five cockpit-exclusive core files (100%) and of all 41 cockpit-tagged commits.

Gaps / caveats: The “sole author” claim is scoped to the five cockpit-exclusive files; the shared session_manager.py has other contributors. A documented --no-cockpit override appears in the design doc but is not present in shipped argparse code. The design doc’s ~600-DOM-node estimate is a planning figure, not verified runtime behavior.

More Amplifier Stories