fix(notifications): emit context notification for intentional stops - #87
Merged
aliou merged 3 commits intoAug 22, 2026
Merged
Conversation
Intentional process kills via the /ps overview panel were completely silent to the agent since v0.10.0: markIntentionalStop caused NotificationService to suppress the lifecycle notification entirely. Emit the notification at context attention instead of fully suppressing it. The agent is not woken (triggerTurn stays false), but it receives the lifecycle message so it can keep its state accurate and respond when context next returns. The user's onKilled/onSuccess/onFailure config is intentionally ignored for intentional stops: a user-initiated kill should never wake the agent, and should always be visible as context.
378-kaiabot
Bot
force-pushed
the
fix/intentional-stop-context-notification
branch
from
August 17, 2026 08:43
066cade to
f6b1d0f
Compare
Document how process lifecycle and log-watch events become agent notifications: the two-layer fanout (NotificationService emits on CHANNELS.NOTIFICATION, delivery listener sends the Pi message), the per-process notify config and defaults, attention-level mapping, the forced-display rule for crashes/failures, the intentional-stop config bypass, the terminate_timeout non-emit path, log-match matching and rate limiting, and a summary matrix of end state to attention. Uses callstacks per end state to show which notification each path triggers and where user config is ignored. Focuses on events; UI rendering is out of scope.
aliou
self-requested a review
August 17, 2026 08:48
Add docs/README.md as an index for the docs directory, covering notifications.md and the two future-design notes. Update AGENTS.md to point at docs/ for both living docs and future-design proposals, with upkeep rules: update the relevant doc when lifecycle, notifications, config, or public behavior changes; anchor call stacks to symbols and plain paths, never line numbers.
378-kaiabot
Bot
force-pushed
the
fix/intentional-stop-context-notification
branch
from
August 17, 2026 09:03
5b6f7dc to
a9acdca
Compare
378-kaiabot
Bot
force-pushed
the
fix/intentional-stop-context-notification
branch
from
August 17, 2026 11:45
a9acdca to
4cc4631
Compare
This was referenced Aug 17, 2026
378-kaiabot
Bot
force-pushed
the
fix/intentional-stop-context-notification
branch
from
August 17, 2026 16:48
4cc4631 to
a9acdca
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Automated pull request by Pi, model
radius/glm-5.2. Implemented and validated empirically againstaliou/pi-processeson branchchore/code-tweaks. See the local run log for the full investigation.Summary
Fixes #72.
Intentional process kills via the
/psoverview panel (pressingx) were completely silent to the agent since v0.10.0.killIntentionallymarks the stop withmarkIntentionalStop, andNotificationService.handleProcessEndedsuppressed the lifecycle notification entirely for intentional stops — so the agent never learned the process ended, neither as a turn nor as context.This was a regression from v0.9.5, where
process_endedevents were always sent to the conversation (display: true) and thealertOnKillflag only controlledtriggerAgentTurn.Change
Instead of fully suppressing notifications for intentional stops, emit them at
contextattention. This preserves the v0.9.5 behavior:triggerTurnstaysfalse).The user's
onKilled/onSuccess/onFailureconfig is intentionally ignored for intentional stops: a user-initiated kill should never wake the agent, and should always be visible as context.Files
extensions/processes/notifications/service.ts— emit acontextlifecycle notification in theisIntentionalStopbranch instead of returning early.extensions/processes/notifications/service.test.ts— updated the two tests that asserted full suppression (suppresses killed notification for intentional stop,suppresses $name exit notification for intentional stop) to assert acontextnotification is emitted, plus registry cleanup..changeset/intentional-stop-context-notification.md— patch changeset.Verification
pnpm test— 576 passed.pnpm typecheck,pnpm lint,pnpm check:changesets— clean.Run host:
golden-hugo-lefevre· Session:01a00ed9-e2cb-78d1-8cbf-c0b091d55f0f· Model:radius/glm-5.2