Gateway: unknown slash commands must not reach the LLM #577

Closed
opened 2026-10-27 13:36:53 +00:00 by sam · 0 comments
Owner

Unknown slash commands currently fall through to free-text LLM chat, causing fabricated command behavior such as /memories claims and false statements about files or model identity. Make slash command recognition deterministic and answer unknown commands locally with guidance to /help, while preserving free-text chat and supported Telegram bootstrap commands.

Acceptance Criteria

Any unrecognized leading slash command is answered locally and never invokes or streams from the LLM. The reply identifies the command as unknown and points to /help. Recognized commands and ordinary free text retain existing behavior. Telegram /start has an explicit deterministic behavior. Tests cover unknown commands with arguments and @gateway mentions, streaming routing, /start, and LLM non-invocation.

Close reason

Verified against current main: Route/RouteStream reject unrecognized slash commands before any LLM call (gateway.go:299-318, 449-462), /start is deterministic in both gateway and Telegram handlers, and full test matrix from acceptance criteria exists (gateway_test.go:106-133, gateway_stream_test.go:54-88, telegram_test.go:135-157). Confirmed by fresh code-tracing pass, not just prior user experience.


Imported from beads archie-core-1786637491053-48-fe78cd53 · GitHub #69 · type bug · priority P2 · created 2026-08-08 · closed 2026-08-15

Unknown slash commands currently fall through to free-text LLM chat, causing fabricated command behavior such as /memories claims and false statements about files or model identity. Make slash command recognition deterministic and answer unknown commands locally with guidance to /help, while preserving free-text chat and supported Telegram bootstrap commands. ### Acceptance Criteria Any unrecognized leading slash command is answered locally and never invokes or streams from the LLM. The reply identifies the command as unknown and points to /help. Recognized commands and ordinary free text retain existing behavior. Telegram /start has an explicit deterministic behavior. Tests cover unknown commands with arguments and @gateway mentions, streaming routing, /start, and LLM non-invocation. ### Close reason Verified against current main: Route/RouteStream reject unrecognized slash commands before any LLM call (gateway.go:299-318, 449-462), /start is deterministic in both gateway and Telegram handlers, and full test matrix from acceptance criteria exists (gateway_test.go:106-133, gateway_stream_test.go:54-88, telegram_test.go:135-157). Confirmed by fresh code-tracing pass, not just prior user experience. --- _Imported from beads `archie-core-1786637491053-48-fe78cd53` · GitHub #69 · type bug · priority P2 · created 2026-08-08 · closed 2026-08-15_
sam added the mediumbugin-progress labels 2026-10-27 13:36:53 +00:00
sam self-assigned this 2026-10-27 13:36:53 +00:00
sam closed this issue 2026-10-27 13:36:53 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#577