last-message 0.1.1: record only the person's own prompts #9

Merged
trtmn merged 1 commit from fix-last-message-origin into main 2026-10-07 18:00:52 +00:00
Owner

Fixes last-message showing a background-task notification (<task-notification> <task-id>…) as the last message in another session.

Cause: the prompt.submit hook recorded every submission, but the engine also raises it for task notifications, peer-session messages and scheduled triggers.

Fix: record only when e.origin?.kind is composer (the person's Enter) or bridge (the person's phone via Remote Control). The existing slash-command skip stays.

Verification

  • claude plugin validate plugins/last-message passes; PII sweep clean.
  • The origin kinds come from the PromptOrigin doc in this build's types. Not yet re-checked in a live session against a real task notification, and no automated test (the harness cannot mount the band without a stand-in tree).

Bumps to 0.1.1 with a changelog entry.

🤖 Generated with Claude Code

https://claude.ai/code/session_01T6Ct6PS5eZDp84PXtGMgGJ

Fixes `last-message` showing a background-task notification (`<task-notification> <task-id>…`) as the last message in another session. **Cause:** the `prompt.submit` hook recorded every submission, but the engine also raises it for task notifications, peer-session messages and scheduled triggers. **Fix:** record only when `e.origin?.kind` is `composer` (the person's Enter) or `bridge` (the person's phone via Remote Control). The existing slash-command skip stays. ## Verification - `claude plugin validate plugins/last-message` passes; PII sweep clean. - The origin kinds come from the `PromptOrigin` doc in this build's types. Not yet re-checked in a live session against a real task notification, and no automated test (the harness cannot mount the band without a stand-in tree). Bumps to 0.1.1 with a changelog entry. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01T6Ct6PS5eZDp84PXtGMgGJ
Task notifications, peer messages and scheduled triggers were replacing the
last message. Filter on e.origin.kind (composer, bridge).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01T6Ct6PS5eZDp84PXtGMgGJ
trtmn merged commit 67cb97f5b0 into main 2026-10-07 18:00:52 +00:00
Sign in to join this conversation.
No reviewers
No labels
CR1
CR2
CR3
CR4
CR5
P0
P1
P2
P3
P4
P5
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
trtmn/agent-plugins!9
No description provided.