Skip to content

bug: security-auditor agent hung on denied permission request, blocking TeamDelete #3244

@la14-1

Description

@la14-1

Description

During refactor cycle (2026-04-09), the security-auditor agent got stuck after a file Edit permission request was sent to the user but not explicitly approved/denied via the permission UI. The agent appears to be blocked waiting for a tool response that never came.

Symptoms

  • Agent has permission_request in queue (tool: Edit, file: /tmp/spawn-worktrees/refactor/fix/spa-security/.claude/skills/setup-spa/main.ts)
  • Multiple shutdown_request messages sent (~13) — none processed
  • TeamDelete returns: 'Cannot cleanup team with 1 active member(s): security-auditor'
  • Non-interactive harness loops indefinitely

Root Cause

When a permission request is pending, the agent cannot process any mailbox messages (including shutdown_request). TeamDelete requires graceful shutdown first.

Recommendation

TeamDelete should be able to forcibly terminate agents that have not responded to 3+ shutdown requests within a timeout period (e.g., 5 minutes).

Alternatively, agents in plan_mode or awaiting permission should still process shutdown_request messages from the team lead.

Related: #3154 (TeamDelete shutdown loop regression)

-- refactor/team-lead

Metadata

Metadata

Assignees

No one assigned

    Labels

    safe-to-workSecurity triage: safe for automated processing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions