Skip to content

Enrich terminal tool result metadata for AI agent workflows#300034

Merged
meganrogge merged 2 commits intomicrosoft:mainfrom
xingsy97:fix/288568-report-terminal-info
Mar 12, 2026
Merged

Enrich terminal tool result metadata for AI agent workflows#300034
meganrogge merged 2 commits intomicrosoft:mainfrom
xingsy97:fix/288568-report-terminal-info

Conversation

@xingsy97
Copy link
Member

@xingsy97 xingsy97 commented Mar 8, 2026

Fix #288568

Copy link
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 PR updates the runInTerminal chat tool result payload to return richer metadata so callers can reference the terminal session later and understand the terminal’s ending working directory (Fix #288568).

Changes:

  • Add terminalId and cwd to toolMetadata for foreground, background, and alternate-buffer result paths.
  • Capture end-of-command cwd via ITerminalInstance.getCwdResource() and include it in the tool result metadata.

@xingsy97 xingsy97 changed the title Report cwd and terminal ID in runInTerminal tool result Enrich terminal tool result metadata for AI agent workflows Mar 8, 2026
@meganrogge meganrogge added this to the 1.112.0 milestone Mar 12, 2026
Copy link
Collaborator

@meganrogge meganrogge left a comment

Choose a reason for hiding this comment

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

Thank you!

@meganrogge meganrogge enabled auto-merge (squash) March 12, 2026 20:13
@meganrogge meganrogge merged commit 41c997a into microsoft:main Mar 12, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Report more information back about runInTerminal call terminal sessions

5 participants