Skip to content

telegram-bridge: append reply directive to inbound messages - #3

Open
bermudas wants to merge 1 commit into
mainfrom
feat/telegram-reply-directive
Open

telegram-bridge: append reply directive to inbound messages#3
bermudas wants to merge 1 commit into
mainfrom
feat/telegram-reply-directive

Conversation

@bermudas

Copy link
Copy Markdown
Owner

Summary

Adds a TG_REPLY_DIRECTIVE suffix appended to every prompt forwarded from Telegram to a worker pane — single-target text, broadcast, and attachment paths. The directive reminds the worker that:

  • the user cannot see the tmux pane,
  • replying requires calling mcp__notify__notify(message="..."), not pane output,
  • the returned message_id should be quoted in taskbox/board references for traceability.

Without it, workers commonly reply in-pane and the user sees silence on Telegram.

Ported from MarketingFactory/octobots.

Trade-offs

  • Context bloat: adds ~300 chars per inbound message. Over long chat sessions this compounds.
  • Alternative location: the directive could live in each agent's AGENT.md / CLAUDE.md instead of per-message. Per-message is harder to ignore but costs context every turn.
  • The directive references the message_id Telegram returns, which currently isn't surfaced by the local notify tool — that's the MF-1 change (separate PR if we choose to port it). The directive still helps without it; the message_id sentence just becomes aspirational.

Test plan

  • Send @role hello via Telegram; confirm the worker prompt ends with the ⚠️ directive block.
  • Send @all status (broadcast); confirm every worker prompt carries the directive.
  • Send a file with caption; confirm the attachment prompt also carries the directive.
  • Confirm the worker actually uses notify to reply rather than printing to pane (manual observation).

Adds a TG_REPLY_DIRECTIVE suffix to every prompt forwarded from
Telegram to a worker pane (single-target, broadcast, and attachment
paths). The directive reminds the worker that:

  - the user cannot see the tmux pane
  - replying requires calling the notify MCP tool, not pane output
  - returned message_id should be quoted in taskbox/board references

Without the directive, workers commonly reply in-pane and the user
sees silence on Telegram.
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