Repository navigation
[feature] Linux terminal: add PTY input, resize and clean console handoff #246
Description
Activity
AetherAI3 commented
on Oct 1, 2026 OwnerAuthorMore actionsReviewed against current main and the open PRs after #251 landed. This issue is not ready to close: the coding console still uses noninteractive pipes and gives shell commands no console stdin; no Linux PTY input/resize/handoff path or real PTY integration fixture has landed. #244 is closed by #251. #245 is adding persistent noninteractive state separately. Keeping #246 open until interactive input, resize/foreground Ctrl+C, terminal ownership/restoration and the real Linux PTY acceptance test are implemented and reviewed.
- added a commit that references this issue
on Oct 1, 2026 - added a commit that references this issue
on Oct 1, 2026 AetherAI3 commented
on Oct 1, 2026 OwnerAuthorMore actionsCompleted and landed in #254, squash commit e17ff4c.
Use
/terminal <command>in the Linux coding console. Ctrl+C interrupts the foreground command; Ctrl+] detaches and returns to chat./terminal-attach,/terminal-statusand/terminal-stopmanage the visible session. Input/resize/output stream through a real controlling PTY. Console input/repaint pause while attached; terminal modes and composer restore on return, including preservation of a draft after a detached child crash. Console shutdown stops the session; restarting never replays it.Acceptance reviewed and tested: eight Linux PTY integration tests exercise input and dimensions, progress, resize, Ctrl+C, stop/process cleanup, failed helper launch, crash/restart, detach/reattach and raw-mode restoration, normal model chat, preserved draft and conservative user-edit attribution. The final complete suite passed: 2,927 passed, 11 skipped, 0 failed. Build/typecheck, docs check, production package verification and release truth passed. Published/merged source tree matches the tested tree: 097cfdf917a8e494a687dbb34c59d8597b163f66. Hosted CI failed before allocating runners/executing steps; no hosted or Windows pass is claimed.
Documented limits: Linux + Python 3 + real TTY required; use
!commandfor noninteractive/platform fallback. One active PTY reserves local tools until exit/stop, starts in the selected shell cwd with a filtered environment, and does not inherit persistent Bash exports/functions. It is an explicit local user terminal, with no implicit Online DM/ATS authority. Closing as completed.
Gap
The current shell runner ignores stdin and pipes stdout/stderr. It cannot support an interactive CLI asking for input, terminal-aware programs, or a live shell handoff. Existing process-tree cancellation should be retained.
Deliverable
Acceptance
A controlled interactive fixture reads input and reports terminal dimensions; a long-running fixture streams progress. Test resize, Ctrl+C, detach/reattach if supported, crash and return to normal chat. Verify no orphan child, duplicate stdin consumer, damaged raw mode or lost draft. Include a real Linux PTY integration test.
Priority: P2. Build on local shell routing/session ownership; do not attach Online DMs to a local terminal implicitly.
Related: #244, #245.