qwen-code/packages
jinye 3f60e595d8
fix(core) monitor notifications for subagents (#3933)
* fix(core): route monitor notifications to owner agent

Route subagent-owned monitor notifications back into the owning agent instead of the parent queue. Keep owner agents alive while their monitors can still produce notifications, and clean up owned monitors silently when the owner exits.

Fixes #3925

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* fix(core): address monitor owner routing review

Clear owner monitor callbacks on registry reset, avoid owner-helper allocation in the monitor idle-wait path, and guard waitable external-input queues against abort races after listener registration.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* fix(core): update monitor agent context import

Align Monitor owner-context imports with the runtime agent context module added on main, and update the related test to use the current runWithAgentContext signature.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* fix(core): snapshot owner monitor cancellations

Collect owner monitor ids before cancelling so pruning terminal entries during cancellation cannot affect the iteration. Add coverage for cancelling owner monitors while retained terminal entries are pruned.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* fix(core): wake owner monitor waits on silent stop

Wake subagent external-input waits when owner monitors are stopped silently, re-check wait predicates after empty wakes, and add coverage for foreground, fork, and resumed owner-monitor routing cleanup.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* fix(core): preserve external input wake metadata

Make implicit-fork external input waits safe for overlapping waiters and persist external input kind for notification observability in subagent transcripts.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* fix(core): close monitor cleanup races

Avoid owner monitor lost wakeups before idle wait registration, make silent monitor cancellation suppress partial-line notification dispatch, and clean resumed owner monitor callbacks when setup fails before execution.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* fix(core): preserve deferred approval owner context

Restore the logical agent id when approved tool continuations re-enter agent frames, keep external message kinds backwards compatible, and document widened background task inputs.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* fix(core): clean up monitor owner resources

Close the resumed agent transcript writer when setup fails before the run body starts, and cancel owner monitors before unregistering their callbacks to avoid stale notification races.\n\nCo-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

---------

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-05-09 13:49:23 +08:00
..
channels chore(release): v0.15.9 [skip ci] 2026-05-08 22:46:11 +08:00
cli fix(cli): preserve comments and formatting in settings.json during migration write-back (#3861) 2026-05-09 12:36:49 +08:00
core fix(core) monitor notifications for subagents (#3933) 2026-05-09 13:49:23 +08:00
sdk-java fix(sdk-java): pass custom env to CLI process (#3543) 2026-04-24 10:37:52 +08:00
sdk-python feat: add commit attribution with per-file AI contribution tracking (#3115) 2026-05-08 09:55:58 +08:00
sdk-typescript refactor: extract shared release helper utilities (#3834) 2026-05-05 10:15:17 +08:00
vscode-ide-companion chore(release): v0.15.9 [skip ci] 2026-05-08 22:46:11 +08:00
web-templates chore(release): v0.15.9 [skip ci] 2026-05-08 22:46:11 +08:00
webui chore(release): v0.15.9 [skip ci] 2026-05-08 22:46:11 +08:00
zed-extension chore(zed-extension): update package version to 0.10.0 2026-02-06 14:26:01 +08:00