Skip to content

Prompt hook: silent on prompts that are not the owner's (#759) - #760

Merged
contursofran merged 1 commit into
mainfrom
agent/759-todo-hook
Nov 13, 2026
Merged

contursofran merged 1 commit into
mainfrom
agent/759-todo-hook

Conversation

@contursofran

Copy link
Copy Markdown
Owner

Fixes #759

Change

  • promptHook prints the todo line only when the prompt holds the owner's own words. ownerWords removes <task-notification>…</task-notification> blocks, <system-reminder> tags and <hc from="…">…</hc> notes; if no text stays, the hook prints nothing (the flow text of a coordinator still goes out as before).
  • No todo tool: Claude Code's UserPromptSubmit input gives only session_id, transcript_path, cwd, permission_mode, hook_event_name and prompt. It has no list of tools, so there is no reliable sign. That part is not changed.

Pre-check

  1. Tests: TestPromptHook cases for a notification alone, a notification in a system reminder, two hc notes, blank text, and owner words beside a notification or note. With the old check put back, it failed on the notification case.
  2. Plan: both issue lines covered (second one: no sign, reported here).
  3. Contract: line text unchanged.
  4. Up to date: branch is on the latest main.
  5. Diff read: no leftovers.
  6. Coverage: both acceptance lines.
  7. Duties: the old <hc from= prefix check and the blank check are part of ownerWords.
  8. Evidence: no change on screen.

@contursofran
contursofran merged commit a4ce864 into main Nov 13, 2026
2 checks passed
@contursofran
contursofran deleted the agent/759-todo-hook branch November 13, 2026 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

kit: the todo hook stays silent on prompts that are not the owner's

1 participant