fix(tmux-subagent): revert session.error cleanup (recoverable-error regression)

Oracle flagged a regression introduced in PR #3507 commit 21554be8:
event.ts routed session.error through tmux pane cleanup BEFORE the
existing session-recovery / model-fallback logic ran.

Problem: when session.error was recoverable (context window limit,
quota rate limit, provider fallback), the recovery/fallback code would
successfully continue the SAME session - but by then its tmux pane had
already been destroyed. User-visible symptom is exactly the original
complaint - 'screen appears but streaming stops working' after an
auto-retry.

Fix is the minimal revert: remove the onSessionError funnel from
event.ts and drop onSessionError from the manager. Fatal errors that
actually end a session still fire session.deleted, which continues to
trigger cleanup correctly. Non-fatal error streams stay attached to
the surviving pane.
This commit is contained in:
YeonGyu-Kim
2026-04-18 20:37:49 +09:00
parent 3dce19d173
commit 859d67f41e
3 changed files with 0 additions and 53 deletions
-12
View File
@@ -838,18 +838,6 @@ export class TmuxSessionManager {
await this.spawnQueue
}
async onSessionError(event: { sessionID: string }): Promise<void> {
if (!this.isEnabled()) return
if (!this.getEffectiveSourcePaneId()) return
if (!this.sessions.has(event.sessionID)) return
log("[tmux-session-manager] onSessionError - routing to cleanup", {
sessionId: event.sessionID,
})
await this.onSessionDeleted(event)
}
async onSessionDeleted(event: { sessionID: string }): Promise<void> {
if (!this.isEnabled()) return
if (!this.getEffectiveSourcePaneId()) return