fix: stop emitting post-background exec updates (#61627) (thanks @openperf)
* fix(exec ): stop emitting tool updates after session is backgrounded When an exec session is backgrounded (background: true), the owning agent run resolves its tool-call promise and may finish. The stdout handler's emitUpdate() closure, however, kept invoking opts.onUpdate(), delivering tool_execution_update events to a listener whose active run had already ended. This surfaced as an unhandled rejection and crashed the gateway process. Guard emitUpdate() with a session.backgrounded || session.exited check so that post-background output is still captured via appendOutput() but no longer forwarded to the (now-stale) agent-loop callback. Fixes #61592 * style: trim exec backgrounding comments * fix: stop emitting post-background exec updates (#61627) (thanks @openperf) * fix: place exec changelog entry at end of fixes (#61627) (thanks @openperf) --------- Co-authored-by: Ayaan Zaidi <hi@obviy.us>feature/PAZ-358-fe-credit-error-display
parent
e6d6b10470
commit
b682202016
Loading…
Reference in New Issue