AutoPilot mode for agent with handoffs results in infinite loop
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
running any custom agent with handoffs + autopilot mode results in infinite loop
- Copilot Chat Extension Version:
- VS Code Version:1.129.0-insider (Universal)
- OS Version: Windows & Mac
- Feature (e.g. agent/edit/ask mode):
- Selected model (e.g. GPT 4.1, Claude 3.7 Sonnet): multiple (tried opus 4.8 & gpt 5.5)
- Logs:
Steps to Reproduce:
1. Define `test agent.agent.md` file with the below content
2. Set vscode mode to `autopilot` enabled
3. start new chat with 'Hi' prompt
```
---
description: 'A custom agent with handoffs.'
tools: [vscode, execute, read, agent, edit, search, web, browser, todo]
handoffs:
- label: Button 1
agent: 'test agent'
prompt: This is a handoff from Button 1.
send: true
- label: Button 2
agent: 'test agent'
prompt: This is a handoff from Button 2.
send: true
---
Always reply with 'Hi, I'm your custom agent. How can I assist you today?'
```
Contributor guide
Assessment
This issue has not been assessed yet.