Agent teammate iTerm session not closed after shutdown
Resolved 💬 3 comments Opened Mar 6, 2026 by codenoah Closed Mar 10, 2026
Description
When using agent teams with the iTerm2 backend, the iTerm session (tab/pane) remains open after the teammate agent shuts down (shutdown_approved).
Expected Behavior
The iTerm tab/pane should close automatically when the agent teammate process terminates after shutdown.
Actual Behavior
The agent process terminates successfully (shutdown approved), but the iTerm tab/pane stays open and must be closed manually.
Environment
- macOS (Darwin 25.3.0)
- iTerm2 with "After a session ends: Close" configured
- Backend type:
iterm2
Steps to Reproduce
- Create a team with
TeamCreate - Spawn a teammate agent with iTerm2 backend
- Send a
shutdown_requestto the teammate - Teammate approves shutdown and terminates
- Observe: iTerm tab/pane remains open
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗