Home

mweinbach / agent-coworker

publicmweinbach/agent-coworker
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

fix(agents): count children with no output yet as still active

2 months ago

1e96862
Authored
mweinbach7/26/2026, 4:18:57 PM
`executionStateForSession` compared `getLatestAssistantText()` against `null`,
but that method returns `string | undefined` and never `null`. A child that had
produced no assistant text yet therefore reported "completed" instead of
"pending_init".

`countActiveChildren` uses that state to enforce MAX_ACTIVE_CHILDREN_PER_PARENT,
so the misclassification let a fan-out over-subscribe the 16-child cap.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kk98XjGKJrKp5ynbiNFMFu

Parente12d853

1 file changed
  • src/server/agents/AgentControl.ts+5−1