Summary
When a user kills a running process via the /ps overview panel (pressing x), the agent receives no notification at all. This is a regression from v0.9.5, where the agent at least saw a lifecycle message in context, even if it did not always get a turn.
Observed behavior
- Start a long-running process, e.g.
bash tests/e2e/scripts/continuous-output.sh.
- Open
/ps and press x on the running process.
- The process terminates, but the agent is never notified — neither as a turn nor as context.
Code analysis
In v0.9.5 (src/hooks/process-end.ts), process_ended events were always sent to the conversation (display: true). The alertOnKill/alertOnSuccess/alertOnFailure flags only controlled triggerAgentTurn. Killing a process via /ps set alertOnKill = false in manager.kill, so the agent was not woken, but it still received a context message.
Since v0.10.0:
extensions/processes/handlers/kill-process.ts marks the stop as intentional with notifications.markIntentionalStop(id).
extensions/processes/notifications/service.ts suppresses the killed/exit notification entirely for intentional stops.
As a result, intentional kills from /ps are completely invisible to the agent.
Expected behavior
Intentional kills should not wake the agent by default, but they should still be delivered as a context notification so the agent can keep its state accurate and respond when context next returns to it.
Suggested fix
Instead of fully suppressing notifications for intentional stops, emit them at context attention level. This preserves the v0.9.5 behavior where the agent knows the process ended, without forcing an idle turn.
Related
extensions/processes/handlers/kill-process.ts (killIntentionally)
extensions/processes/notifications/service.ts (intentional stop suppression)
- Prior v0.9.5 behavior in
src/hooks/process-end.ts
Summary
When a user kills a running process via the
/psoverview panel (pressingx), the agent receives no notification at all. This is a regression from v0.9.5, where the agent at least saw a lifecycle message in context, even if it did not always get a turn.Observed behavior
bash tests/e2e/scripts/continuous-output.sh./psand pressxon the running process.Code analysis
In v0.9.5 (
src/hooks/process-end.ts),process_endedevents were always sent to the conversation (display: true). ThealertOnKill/alertOnSuccess/alertOnFailureflags only controlledtriggerAgentTurn. Killing a process via/pssetalertOnKill = falseinmanager.kill, so the agent was not woken, but it still received a context message.Since v0.10.0:
extensions/processes/handlers/kill-process.tsmarks the stop as intentional withnotifications.markIntentionalStop(id).extensions/processes/notifications/service.tssuppresses the killed/exit notification entirely for intentional stops.As a result, intentional kills from
/psare completely invisible to the agent.Expected behavior
Intentional kills should not wake the agent by default, but they should still be delivered as a context notification so the agent can keep its state accurate and respond when context next returns to it.
Suggested fix
Instead of fully suppressing notifications for intentional stops, emit them at
contextattention level. This preserves the v0.9.5 behavior where the agent knows the process ended, without forcing an idle turn.Related
extensions/processes/handlers/kill-process.ts(killIntentionally)extensions/processes/notifications/service.ts(intentional stop suppression)src/hooks/process-end.ts