Skip to content

fix(scheduling): private reminders must not leak into a channel - #97

Open
BreadrichEngels wants to merge 1 commit into
mainfrom
fix/private-reminder-no-channel-leak
Open

fix(scheduling): private reminders must not leak into a channel#97
BreadrichEngels wants to merge 1 commit into
mainfrom
fix/private-reminder-no-channel-leak

Conversation

@BreadrichEngels

Copy link
Copy Markdown
Contributor

Bug

A user (bagelface) asked for a private "remind me in 8 hours" reminder. The reminder DM was delivered to them correctly — but the scheduled task's final narration ("DM sent to bagelface ✅") was posted to the task's bound chat, which threaded into a channel where another user could see it. A personal reminder leaked.

Root cause

A scheduled task's final assistant reply is delivered to the chat the task is bound to (channel/thread). dm_user correctly delivered the private DM, but the agent's "done" message wasn't suppressed, so it surfaced publicly. The scheduling-rules skill had no guidance on output scoping for private tasks.

Fix

Adds a "Private Reminders Must Not Leak Into a Channel" section to container/skills/scheduling-rules/SKILL.md. Going forward, any reminder / private / DM-only task must:

  1. deliver only via dm_user to the requester(s);
  2. wrap its entire response in <internal></internal> so no narration is posted to any channel/thread;
  3. run isolated; and
  4. keep the acknowledgment private too when the request was private.

Includes a ready-to-use template prompt so the pattern is followed every time.

Test plan

  • Schedule a private reminder; confirm the only visible artifact is the DM to the requester — nothing in any channel/thread, no other user sees it.

🤖 Generated with Claude Code

A scheduled task's final reply is delivered to the task's bound chat
(channel/thread). So even when the task correctly DMs the requester, its
"done" narration leaks to a channel — a personal reminder ended up visible
to another user. Add a rule: private/DM-only tasks must deliver ONLY via
dm_user to the requester(s) and wrap their entire response in <internal> tags
so nothing is posted to any channel.
@RonTuretzky
RonTuretzky force-pushed the fix/private-reminder-no-channel-leak branch from 7e4bf98 to 7ab17c3 Compare July 31, 2026 20:21
RonTuretzky pushed a commit that referenced this pull request Jul 31, 2026
…king into channels (#46)

Reminders/private scheduled tasks were leaking their result narration
(e.g. "DM sent to X ✅") into the bound chat/thread, where non-requesters
could see it. The live-message path was fixed in #46 via replyToMessageId
anchoring, but the scheduled-task path was never covered, and #97's
'wrap narration in <internal>' is a prompt-level rule the agent can forget.

Add a structural per-task 'delivery' mode:
- 'channel' (default): result posts to chat_jid, unchanged behavior
- 'silent': orchestrator never posts the result to a channel; the real
  output goes out via dm_user during the run

Enforced in the scheduler (shouldNarrateToChannel), not by the agent.
DB column is NOT NULL DEFAULT 'channel' (additive migration), so every
existing task keeps current behavior — zero regression.

- types: ScheduledTask.delivery?
- db: column + additive migration + createTask insert
- ipc: schedule_task parses/persists delivery
- container tool: schedule_task gains delivery param + guidance
- skill: scheduling-rules documents silent for private reminders
- tests: db round-trip/default + shouldNarrateToChannel predicate
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.

1 participant