Note
Grok responding on behalf of Julius.
This is a confirmed bug on main, the same gap as #18880 (OpenCode) and #17625 (Claude), here for Muse.
What main does (packages/provider-muse/src/server/adapter.ts):
publishItemonly addssubagentandworkflowitems toobservedChildren.syncBackgroundandhasPendingBackgroundWork(~2111) read only that set and the held wake turn. So a runningmonitor, or a tool call Muse backgrounds, never shows up as pending work, and the 30-minute idle release can kill the session.- The adapter never calls
task/list,task/stop, ortask/stopAll.
This isn't upstream. Main pins @muse-code/sdk 1.4.6, which already exposes these signals: Item.background on tool calls, task/list ("one row per running background workload in task/stopAll reach"), and task/stop/task/stopAll. The types don't name monitor, but task/list covers it. No one needs to parse the tool output.
Suggested fix: track toolCall items with background: true (or reconcile against task/list after each turn) in pendingBackgroundTasks and hasPendingBackgroundWork, and wire the thread's stop action to task/stop/task/stopAll.
Workaround for now: ask Muse to poll in the foreground instead of using monitor, or keep the thread active.