Skip to content

Implement await terminal tool#290366

Merged
Tyriar merged 2 commits intomainfrom
tyriar/await
Jan 26, 2026
Merged

Implement await terminal tool#290366
Tyriar merged 2 commits intomainfrom
tyriar/await

Conversation

@Tyriar
Copy link
Copy Markdown
Contributor

@Tyriar Tyriar commented Jan 26, 2026

Fixes #288565

@Tyriar Tyriar added this to the January 2026 milestone Jan 26, 2026
@Tyriar Tyriar self-assigned this Jan 26, 2026
Copilot AI review requested due to automatic review settings January 26, 2026 11:24
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request implements a new awaitTerminal tool that allows chat agents to wait for background terminal commands to complete, addressing issue #288565. This eliminates the need for agents to use workarounds like echo "finished" or sleep n commands when waiting for background tasks.

Changes:

  • Adds a new AwaitTerminalTool that can wait for terminal executions with configurable timeout
  • Exposes an IActiveTerminalExecution interface and getExecution() method in RunInTerminalTool to allow other tools to access active terminal executions
  • Registers the new tool in the tool contribution system

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.ts New tool implementation that waits for terminal completion with timeout support
src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts Adds interface and static method to expose active terminal executions to other tools
src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.ts Registers the new await terminal tool in the tool service

@Tyriar Tyriar marked this pull request as ready for review January 26, 2026 12:13
@Tyriar Tyriar enabled auto-merge January 26, 2026 12:13
@Tyriar Tyriar merged commit 9f4c49e into main Jan 26, 2026
22 checks passed
@Tyriar Tyriar deleted the tyriar/await branch January 26, 2026 12:45
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Mar 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add tool to await existing background terminal(s)

3 participants