Conversation
New skill that lets agents proactively send messages to paired users via the TinyClaw outgoing queue. Includes a TypeScript script with two commands: - list-targets: reads pairing.json to show approved pairings - send: writes a properly formatted message to the outgoing queue Handles the multi-pair ambiguity problem by having agents list targets first, then select the appropriate channel + senderId. https://claude.ai/code/session_01Ktbe9k9n52gRZJNBeASvGz
|
@codex review this PR |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2c28670c65
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const messageId = generateMessageId(); | ||
| const timestamp = Date.now(); |
There was a problem hiding this comment.
Route proactive sends by recipient instead of new messageId
The send command always generates a fresh messageId, but all three channel clients deliver outgoing items only when pendingMessages.get(messageId) succeeds and otherwise delete the file as stale (src/channels/discord-client.ts checkOutgoingQueue, similarly in telegram-client.ts and whatsapp-client.ts). In heartbeat/proactive usage there is no pending inbound message with this generated ID, so messages queued by this skill are dropped and never sent to the user despite being written to queue/outgoing.
Useful? React with 👍 / 👎.
Channel clients were deleting outgoing messages that had no matching pendingMessages entry. Proactive messages (from send-user-message skill, heartbeat, scheduled tasks) never have a pending entry since they aren't triggered by an incoming user message. All three clients now fall back to the senderId field in the response JSON to resolve the target chat/user. Proactive messages are sent without reply_to_message_id since there's no original message. Fixes the P1 issue flagged in PR TinyAGI#59. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
New skill that lets agents proactively send messages to paired users
via the TinyClaw outgoing queue. Includes a TypeScript script with
two commands:
Handles the multi-pair ambiguity problem by having agents list
targets first, then select the appropriate channel + senderId.
https://claude.ai/code/session_01Ktbe9k9n52gRZJNBeASvGz