Skip to content

Emit run-skipped when queued subagent work is cancelled - #605

Open
flamerged wants to merge 1 commit into
LibreChat-AI:mainfrom
flamerged:fix-queued-subagent-run-skipped
Open

flamerged wants to merge 1 commit into
LibreChat-AI:mainfrom
flamerged:fix-queued-subagent-run-skipped

Conversation

@flamerged

Copy link
Copy Markdown

When a subagent task is cancelled while it is still queued, its factory never starts and consumers receive no lifecycle signal for that skipped run. This adds an opt-in, inert-by-default hook that reports the skipped task once with its task and scope identity.

The hook does not report work after the factory has entered. A throwing observer leaves task state and counters intact.

Focused coverage in InMemorySubagentTaskStore.run-skipped.spec.ts verifies queued cancellation, the factory-entry boundary, task/scope isolation, observer exceptions, and the inert default. All five cases pass against current upstream main (97b2db3a). No dependency or public protocol changes are included.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant