Skip to content

fix(runtime): warn on stranded tasks after drain timeout - #272

Merged
David-patrick-chuks-02 merged 2 commits into
Lilly-Protocol:mainfrom
alexsmolya:bounty/issue-258-timeout-warning
Sep 6, 2026
Merged

fix(runtime): warn on stranded tasks after drain timeout#272
David-patrick-chuks-02 merged 2 commits into
Lilly-Protocol:mainfrom
alexsmolya:bounty/issue-258-timeout-warning

Conversation

@alexsmolya

Copy link
Copy Markdown
Contributor

Summary

AgentRuntime.stop() previously finished silently when a positive drain timeout expired with tasks still running.

This change emits one warning through the configured runtime logger after draining returns when tasks remain in flight. Warning metadata includes runtimeId, taskIds, inFlightTaskCount, drainTimeoutMs, and drainElapsedMs.

Omitted/zero timeout and successful-drain behavior remain unchanged. Focused runtime tests pass 22/22, and full npm run verify passes 55 files / 230 tests. Untouched-main verification passes 55 files / 226 tests.

No #259 promise-tracking redesign is included.

Fixes #258

@David-patrick-chuks-02
David-patrick-chuks-02 merged commit abee3d4 into Lilly-Protocol:main Sep 6, 2026
0 of 2 checks passed
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.

[Bounty: $100] Warn when AgentRuntime.stop() times out with tasks still in flight

3 participants