You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Event automation dispatches never count toward the automated-turn limit #2002
A conversation also has a consecutive automated-turn limit. Resource-event watches count on the Conversation. Event-task dispatches count on the Destination. After the limit, further automated wakes stay quiet until a user message clears the pause.
The Watch part works. The event-task part does not exist in the code.
What the code does
Only the Watch path checks the limit. admitAutomatedTurn is called in one place, events/notification.ts, for the watched Conversation.
After a turn, recordFinishedTurnForAutomatedLimit counts automated turns per Conversation (task-execution/conversation-turn.ts and providers/slack/turn.ts).
Each dispatch runs in its own Conversation, agent-dispatch:<dispatchId> (getDispatchConversationId in agent-dispatch/store.ts). So each dispatch starts at a count of zero, and the count never builds up for a Destination.
No code in event-automations/ or agent-dispatch/ checks or counts the limit for a Destination.
Impact
An event automation whose own work causes new matching Events can keep running. For example, a push from the automation can cause another pull request Event that starts the automation again. The limit that stops this for Watches does not apply.
Expected
Count event-automation dispatches for their Destination, and keep further dispatches quiet after the limit, as the README says. If dispatches should not have this limit, change the README instead.
Tests
No test covers this through the runtime. The existing tests call the limit functions directly (tests/unit/services/automated-turn-limit.test.ts, tests/component/events/events.test.ts).
Activity
docs(chat): Remove stale Destination automated-turn limit claim (gets…