Skip to content

Support configurable bot commands in agentic mode #176

@sakhnenkoff

Description

@sakhnenkoff

Problem

Related to #173.

In agentic mode, get_bot_commands() returns a hardcoded list of commands. Users who define custom slash commands (forwarded to Claude via _handle_unknown_command) have no way to make those commands appear in Telegram's / command menu without patching orchestrator.py directly.

The passthrough mechanism works great — unrecognized /commands are forwarded to Claude as natural language. But without menu visibility, users have to remember their custom commands or type them manually.

Proposed Solution

Allow users to define additional bot commands via environment variable or config file. These would be added to get_bot_commands() for menu visibility only — they would NOT be added to _known_commands, so they continue to pass through to Claude via _handle_unknown_command.

Example config approach:

CUSTOM_BOT_COMMANDS=today:Morning briefing,closeday:End of day review,capture:Quick capture

Or via a YAML/JSON config section.

I have a simpler implementation that adds specific commands directly — happy to open a PR as a starting point or discuss the config approach.

Environment

  • claude-code-telegram v1.6.0
  • Agentic mode enabled

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions