You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RunInTerminalTool: OutputMonitor.detectsInputRequiredPattern fallback regexes false-positive on benign command output, pausing the agent loop #315476
bugIssue identified by VS Code Team member as probable bugchat-terminal-output-monitorOutput monitoring in the terminal tool which detects when commands finish or user input is requiredinsiders-releasedPatch has been released in VS Code InsidersverifiedVerification succeeded
Model: independent (reproduces across all Copilot models)
Summary
In agent mode, the loop pauses on benign terminal output whose final line happens to end with : + space or ? + space. The chat host injects [Terminal {id} notification: command may be waiting for input...] and asks the agent whether to send input, even when the underlying command has already exited 0.
The function's own JSDoc (~line 614) says these "may produce false positives on normal command output, so they should only be used after the terminal has been confirmed idle through normal polling."
_waitForIdle (~line 519) honours that contract and gates the broad-pattern check on recentlyIdle && isActive === true, where recentlyIdle requires multiple consecutive idle polls. _handleIdleState (~line 395) does not — it calls detectsInputRequiredPattern on entering Idle and immediately fires onDidDetectInputNeeded if it returns true.
Common output trips this: git informational lines, docker status columns, build tools printing labelled section headers, anything ending in Status: or Done: . Live trigger rate on this machine: 5/5 on a single multi-step turn. Each pause costs an extra round trip while the agent decides "no input needed" and resumes.
The repo's own tests acknowledge the broadness: outputMonitor.test.ts (~line 497) has cases named "does NOT match bare colon prompts (too broad for fast-path)".
Drop the broad fallback from detectsInputRequiredPattern and rely on detectsHighConfidenceInputPattern alone. Genuinely-stuck commands without shell integration are still caught by the 2-minute _handleTimeoutState path, so coverage isn't lost.
bugIssue identified by VS Code Team member as probable bugchat-terminal-output-monitorOutput monitoring in the terminal tool which detects when commands finish or user input is requiredinsiders-releasedPatch has been released in VS Code InsidersverifiedVerification succeeded
Activity
outputMonitor: fix two false-positive families pausing the agent loop
outputMonitor: fix two false-positive families pausing the agent loop
outputMonitor: fix two false-positive families pausing the agent loop
outputMonitor: fix two false-positive families pausing the agent loop
outputMonitor: fix two false-positive families pausing the agent loop
outputMonitor: fix two false-positive families pausing the agent loop