Skip to content

Comments

feat: add send-user-message agent skill#59

Merged
jlia0 merged 2 commits intomainfrom
claude/add-send-user-message-skill-Z408d
Feb 15, 2026
Merged

feat: add send-user-message agent skill#59
jlia0 merged 2 commits intomainfrom
claude/add-send-user-message-skill-Z408d

Conversation

@jlia0
Copy link
Collaborator

@jlia0 jlia0 commented Feb 14, 2026

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

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
@jlia0
Copy link
Collaborator Author

jlia0 commented Feb 14, 2026

@codex review this PR

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +163 to +164
const messageId = generateMessageId();
const timestamp = Date.now();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@jlia0 jlia0 merged commit 32679d5 into main Feb 15, 2026
@jlia0 jlia0 deleted the claude/add-send-user-message-skill-Z408d branch February 15, 2026 00:29
paulscan added a commit to paulscan/tinyclaw that referenced this pull request Feb 15, 2026
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>
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.

2 participants