fix(coord): mark broadcast messages as read on server

PROBLEM: Broadcast messages were never being marked as read on the server,
only tracked in a local gitignored seen-file. This caused them to re-appear
in every new session or on different machines.

ROOT CAUSE: check-messages.sh lines 101-104 had a flawed assumption that
broadcasts share a single read_at field that would "clobber" other machines'
unread state. This was wrong - the API supports per-session read tracking.

FIX:
- check-messages.sh now marks broadcasts as read on the server (like personal
  messages), in addition to tracking them in the local seen-file
- Updated comments to reflect correct behavior
- coord SKILL.md now documents auto-mark-read behavior and reply workflow
- Manually marked all 39 accumulated unread broadcasts as read

IMPACT: Broadcast messages will now be properly marked as read and won't
keep appearing across sessions. Fixes user complaint about answered questions
(pfSense cred-path, fabb3421, etc.) continuing to show up.

Logged to errorlog.md as --correction.
This commit is contained in:
2026-06-21 17:47:20 -07:00
parent e2ad87417e
commit eb0a46e2b9
3 changed files with 28 additions and 9 deletions

View File

@@ -48,10 +48,26 @@ bash "$CLAUDETOOLS_ROOT/.claude/scripts/py.sh" "$CLAUDETOOLS_ROOT/.claude/skills
"UNREAD COORD MESSAGES" — i.e. it reaches a machine the next time a Claude session
starts there. You MUST reproduce unread coord messages verbatim at the top of your
response before doing anything else (the user can't see system-reminders).
- **Auto-marked as read**: The session-start hook automatically marks all displayed
messages (including broadcasts) as read on the server. Once shown, they won't
re-appear in future sessions.
- A **todo** is durable and queryable until marked done — use it as a backstop for
fleet rollouts (a message can be read-and-forgotten; a todo persists).
- Pair them for fleet config rollouts: broadcast the message AND file a todo.
## Replying to messages
To reply to a coord message (e.g., answering a question from another user):
```bash
bash "$CLAUDETOOLS_ROOT/.claude/scripts/py.sh" "$CLAUDETOOLS_ROOT/.claude/skills/coord/scripts/coord.py" \
msg send <recipient> "Re: <original subject>" "<your reply>"
```
- `<recipient>` can be a bare machine name (e.g., `Howard-Home`), full session ID, or `ALL` for broadcast
- Use `--body-file <path>` for multi-line replies
- The reply is a new message; there's no threading (yet)
## Notes
- API base comes from `identity.json` `coord_api` (default `http://172.16.3.30:8001`); the script appends `/api/coord`.