Interactive mode: make it behave like a real terminal#257
Merged
Conversation
Interactive mode already renders the real claude/codex TUI via raw-PTY xterm passthrough; this closes the gaps that made it feel un-terminal-like. A. Single input surface. Drop the line-injecting chat box from the interactive panel — the terminal is now the sole input, so Tab-complete, slash menus, @-file mentions, y/n prompts and multi-line paste all work natively (the chat box submitted whole lines + a forced Enter, which broke all of those). A thin hint points the user at the terminal. B. Terminal fidelity. Enable tmux mouse mode + history-limit 50000 globally at server start (scroll/click inside TUIs; deep scrollback instead of ~2000 lines). Debounce the terminal-view resize cascade so a drag-resize issues one fit instead of a burst of resize_pty calls that flicker the TUI. C. Completion is advisory, not authoritative. An interactive session is human-in-the-loop, so the watcher no longer auto-advances the pipeline the instant the agent prints its done-sentinel, and no longer marks a session FAILED at the 2h timeout. Instead it keeps the TUI alive, drops the task to idle, and emits agent:<task>:interactive_done. The panel surfaces an "Advance column" affordance; the user advances when satisfied via the new agent_advance command (runs the same mark_complete the headless path runs). The /exit-on- success teardown is removed so the session persists for continued chat. Tests: cargo clippy/test --workspace (497+19), vitest (411, +banner test), tsc, lint — all green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Interactive mode already renders the real
claude/codexTUI via raw-PTY xterm passthrough (arrows/Ctrl/Tab/Esc/resize already work). This closes the gaps that made it feel un-terminal-like. All green: clippy + cargo test --workspace (497+19), vitest (411), tsc, lint.A — Single input surface
Dropped the line-injecting chat box from the interactive panel. The terminal is now the sole input, so Tab-complete, slash menus,
@filementions, y/n prompts, and multi-line paste work natively — the chat box submitted whole lines + a forced Enter, which broke all of those. A thin hint points the user at the terminal.B — Terminal fidelity
tmux set -g mouse on+history-limit 50000at server start → scroll/click inside TUIs and deep scrollback (was ~2000 lines).terminal-viewresize cascade so a drag-resize issues one fit instead of a burst ofresize_ptycalls that flicker the TUI.C — Completion is advisory, not authoritative
An interactive session is human-in-the-loop, so the watcher no longer:
Instead it keeps the TUI alive, drops the task to
idle, and emitsagent:<task>:interactive_done. The panel shows an "Advance column" affordance; you advance when satisfied via the newagent_advancecommand (samemark_completethe headless path runs). The/exit-on-success teardown is removed so the session persists for continued chat.Notes / follow-ups
--append-system-prompt/resume parity.🤖 Generated with Claude Code