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

  1. Create a team with TeamCreate
  2. Spawn a teammate agent with iTerm2 backend
  3. Send a shutdown_request to the teammate
  4. Teammate approves shutdown and terminates
  5. Observe: iTerm tab/pane remains open

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗