Skip to content

fix(chat): bot_message_id is update-only; never invent one - #162

Closed
mauriciomdb wants to merge 1 commit into
mainfrom
fix__bot_message_id_clarity
Closed

mauriciomdb wants to merge 1 commit into
mainfrom
fix__bot_message_id_clarity

Conversation

@mauriciomdb

Copy link
Copy Markdown
Contributor

Why

A coding agent sent messages with its own bot_message_id values (e.g. gos-test-plain-1). bot_message_id only updates a message Dailybot already sent, so every send was a silent no-op edit: 200, the id echoed back, nothing delivered. The API now refuses such ids with 400 unknown_bot_message_id (api-services feature__new_dailybot); this makes the CLI say the same thing up front.

What

  • dailybot chat send --help: every send posts a new message; Dailybot creates and returns bot_message_id; keep it only for chat update (72h); never invent one.
  • dailybot chat update --help: BOT_MESSAGE_ID is the id a send returned, never one you choose.
  • chat send --payload-json with a bot_message_id is refused locally (exit 1) with a pointer to chat update.
  • The API's unknown_bot_message_id error gets a plain explanation.
  • README: a "New message vs. edit" paragraph and a clearer chat update row.

Tests

ruff check, ruff format --check, mypy dailybot_cli clean; pytest tests/chat_commands_test.py 53 passed (3 new).

🤖 Generated with Claude Code

https://claude.ai/code/session_01AY6kxNxkCZG2pPJSh1Bxer

`chat send` help and the README now say every send posts a new message,
Dailybot creates and returns its bot_message_id, and that id is kept only
for `chat update` (72h). A `--payload-json` body carrying bot_message_id is
refused locally with a pointer to `chat update`, and the API's new
`400 unknown_bot_message_id` gets a plain explanation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AY6kxNxkCZG2pPJSh1Bxer
@xergioalex
xergioalex marked this pull request as ready for review December 3, 2026 18:20
@xergioalex xergioalex added the Ready Trigger AI code review label Dec 3, 2026
@xergioalex

Copy link
Copy Markdown
Member

Continued in #164 (same commits, opened from a maintainer account so the AI review gate runs).

@xergioalex xergioalex closed this Dec 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready Trigger AI code review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants