[VS Code] Closing Duo's terminal prevents tool runs until restart

MR: fix: Re-create workflow terminal when closed (!2788 - merged)

Checklist

Summary

Closing Duo's terminal prevents tool runs until restart

Steps to reproduce

When Duo Agentic Chat runs commands, it does it in a terminal window that pops up. That's really nice for transparency. But if I close that terminal then it will just hang when trying to run tools again.

What is the current bug behavior?

I just get stuck on the approve tool flow, clicking on the blue button but nothing happens. However if I restart VS Code and open that chat from history, I can approve the tool and it will open a fresh terminal.

What is the expected correct behavior?

It would be nice if Agentic Chat could recover by opening a new terminal if it's closed.

Relevant logs and/or screenshots

Approving will continue to run and requires user intervention.

image.png

Proposed Solution

When the terminal is closed, the next tool execution should either:

  • Create a new terminal automatically OR
  • Detect the closed terminal and clean up, then create a fresh one
Edited by Enrique Alcántara