Watch, inspect, and steer your AI sessions in real time.
The human is no longer just the task-giver — they're the co-pilot.
You give the AI a task and stare at a spinner. No visibility into what it's thinking, which tools it's calling, or whether it's heading off the rails.
See the agent going wrong? Too bad. You can cancel and start over, but you can't nudge it mid-session. Wasted tokens, wasted time.
Tool calls, thinking blocks, agent delegations — they happen invisibly. Debugging requires reading raw JSON transcripts after the fact.
AI sessions are like autopilot with no instrument panel. You trust the machine, but you can't see what it sees.
1,359 lines of purpose-built UI. Single session, block-based rendering, inspector side panel — optimized for tmux panes.
display fighting.selected CSS classToggle with F2. Click any block to pin. The inspector shows full content of any block in the conversation stream — 324 lines of purpose-built widget code.
Follows the currently streaming block in real time. As the AI thinks and responds, the inspector tracks the latest content automatically.
Click any ChatBlock or use /prev and /next to navigate. Pins the inspector to a specific block for deep inspection. Stays locked while the session continues.
Type /ask <question> to query a side LLM about the pinned block. The response displays inline without touching the main session.
The inspector's three sub-areas — block detail, status line, and input — mirror the cockpit's own chat/status/input structure. A panel within a panel.
The SteerQueue lets humans inject messages at natural pause points between tool calls — without cancelling the session.
In the inspector panel, free text or /steer "focus on the auth module" queues a message.
A bounded deque (max 10 items) with backpressure. Oldest message dropped if queue is full.
Between tool calls, _check_steer_queue() fires. If session is mid-execution, the message is injected via handle.inject_user_message(). If idle, it becomes the next regular message.
The agent sees the injected message as part of the conversation and adapts. No restart, no lost context.
A separate LLM session for asking questions about what you're observing. The main session never sees your side conversation.
The side session is only created on first /ask invocation. No overhead until you need it. Managed independently with its own conversation state.
When you /ask, the inspector builds context from the current pinned block — block ID, type, turn index, and full content — then sends your question to the side LLM.
1,359 lines — Textual App, layout, streaming, session lifecycle
324 lines — live/pinned/ask modes, block navigation, search
209 lines — BlockInfo, BlockRegistry, SteerQueue — pure data, no TUI dependency
88 lines — thin widget wrapper with click-to-select and visual state
169 lines — slash commands, tmux helpers, dynamic /help discovery
CockpitApp inherits from 7 command mixins + SharedAppBase + Textual App. Each mixin contributes slash commands without monolithic coupling.
InspectorSteerRequest and InspectorAskRequest bubble up from InspectorPanel to CockpitApp via Textual's message system. Zero coupling.
All session operations run in @work(thread=True) workers. UI stays responsive. call_from_thread() delivers updates safely.
When you resume a session, the cockpit loads transcript.jsonl and renders every prior message as proper ChatBlock widgets. You see the full conversation history, not just a session ID.
Session IDs are stored as tmux pane variables (@amp_session_id). When cockpit launches in a tmux pane, it automatically resumes the previous session. Close and reopen — you're right back.
The cockpit's /help command queries the live session to discover available modes and skills — then displays them alongside built-in commands.
/help — this dynamic help/shell — open tmux split/clear — clear chat + context/status — session info/new — start fresh session/quit — exit cockpit/mode NAME — activate a mode/skills — list available skills/tools — list available tools/agents — list available agents/save — save transcript/compact — free token spaceUnrecognized slash commands aren't rejected — they're forwarded to the Amplifier session. The cockpit handles its own commands locally, and lets the session handle everything else.
feat(cockpit))fix(cockpit))test(cockpit))test_cockpit_app.py — 493 linestest_block_model.py — 276 linestest_inspector_panel.py — 249 linestest_cockpit_integration.py — 150 linestest_cockpit_cmds.py — 59 linesThe cockpit is live. Session observation, mid-flight steering, side-channel queries — the human stays in the loop without blocking the agent. The next step: multi-session orchestration, where the cockpit becomes a flight deck.
Repository: amplifier-tui (private, ANext org)
Analysis date: May 20, 2026
Primary contributor: Sam Schillace
Commit window: March 31 – April 15, 2026 (16 days, cockpit-specific)
Git commands used:
git log --oneline --since="60 days ago" --no-merges → 43 commitsgit log --oneline --since="60 days ago" --no-merges --grep="cockpit" → 40 cockpit-specificgit log --since="60 days ago" --no-merges --format="%an" | sort -u → 1 contributor (Sam Schillace)git log --grep="feat" ... → 18 · --grep="fix" → 17 · --grep="test" → 8File metrics (wc -l):
cockpit_app.py: 1,359 · inspector_panel.py: 324 · block_model.py: 209cockpit_cmds.py: 169 · chat_block.py: 88 · Total cockpit source: 2,148 linesfind amplifier_tui -name "*.py" | wc -l → 171 Python filesfind amplifier_tui -name "*.py" | xargs wc -l → ~37,000 total linesNo fabricated metrics. All numbers are reproducible from the repository with the commands listed above.