Skip to content

feat(telegram): /mode command to switch Claude Code permission mode #181

@TerrysPOV

Description

@TerrysPOV

Problem

Switching between Claude Code permission modes (plan-only, accept-edits, unrestricted) requires restarting the daemon with a different flag. There is no way to change mode mid-session from Telegram.

Proposed solution

Add a /mode Telegram command:

/mode plan          → sets --permission-mode plan
/mode edit          → sets --permission-mode acceptEdits  
/mode unrestricted  → sets --permission-mode bypassPermissions
/mode               → shows current mode

The daemon stores the current mode in settings/state and passes it to the next Claude invocation. Mode changes take effect on the next message (not mid-session).

Allowed only for users in allowedUserIds (same restriction as all other privileged commands).

Security note

Mode switching should be gated behind the existing allowedUserIds allowlist. Switching to unrestricted could be logged as a security event.

Source

Requested by @dathtd119 in #14 (Mega-Post).

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