fix(background-agent): clean tmux cancel bookkeeping

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-04-04 15:40:21 +09:00
parent fd476fe9a1
commit b31dfa6928
2 changed files with 13 additions and 0 deletions
+4
View File
@@ -493,6 +493,10 @@ export class BackgroundManager {
if (this.tasks.get(task.id)?.status === "cancelled") {
await this.abortSessionWithLogging(sessionID, "cancelled during tmux setup")
subagentSessions.delete(sessionID)
if (task.rootSessionID) {
this.unregisterRootDescendant(task.rootSessionID)
}
this.concurrencyManager.release(concurrencyKey)
return
}