# VS Code Copilot — Terminal Command Completion Not Reliably Detected (Discussion #161238) ## Metadata | Field | Value | |---|---| | Institute | Molodetz Institute — Research & Retrieval Division | | Subject | shell-multiplexer-auto-attach | | Document type | Source Dossier | | Tier | 1 | | Source title | Copilot does not detect terminal command has completed or is not getting terminal output | | Source URL | https://github.com/orgs/community/discussions/161238 | | Source publisher / author | GitHub Community Discussions (Copilot) | | Source type | forum thread | | Source date (published) | Unknown — not stated | | Date researched | 2026-10-09 | | Researched by | tai (agent), model: Claude Sonnet 5, on behalf of retoor | | Research method | web search synthesis | | Confidence | Medium | | Status | Active | ## Summary Documents that VS Code's own terminal API does not provide a reliable signal for "has this shell command finished," forcing Copilot's agent integration to fall back on heuristics — direct evidence that even a tool built by the same vendor as the terminal itself struggles with reliable terminal-state detection. ## Key findings - The unreliability isn't specific to third-party automation reading a terminal from outside; it's present even for first-party tooling with presumably the best possible access to the terminal's actual state. - This is framed as an ongoing, acknowledged gap, not a solved problem with a known fix. ## Pros / strengths - Strong corroborating evidence (from a major, well-resourced vendor's own open issue tracker) that reliable terminal-state/command-completion detection is a genuinely hard, unsolved-in-general problem — not something this proposal is failing to find an obvious answer to because of insufficient research. ## Cons / limitations / caveats - About command-completion detection specifically, a related but distinct problem from this subject's main question (human vs. automation at shell *startup*) — cited here as supporting evidence for "terminal state detection is hard in general," not as a direct answer to the startup-detection question. ## Relevance to tai Sets realistic expectations for the proposal: whatever detection heuristic ships, it should be designed to fail safe (default to NOT auto-wrapping when uncertain, with an easy manual opt-in) rather than promising perfect detection — because even well-resourced, first-party tooling hasn't solved the adjacent problem of terminal-state detection in general. ## Changelog | Date | Change | |---|---| | 2026-10-09 | Initial dossier created. |