| title | Command Reference |
|---|
This is the detailed reference for Telegram commands supported by Incursa Codex Telegram.
Use README.md for first setup and usage.md for day-to-day workflows.
- Commands are case-insensitive.
- Arguments are separated by whitespace unless a command says otherwise.
- Session IDs can be abbreviated if the prefix is unambiguous.
- Project selectors can be a list number, project key, project name prefix, or full path.
- Private chats, trusted group roots, and forum topics can auto-route plain text to the active session.
- Use
/send <text>when Telegram privacy mode or an unsupported chat type prevents normal auto-routing. - Attachments are forwarded to Codex when they are attached to a routed message.
- Voice notes are transcribed first, then either captured into an input bundle or sent to the active session according to
TelegramInput:DefaultCaptureMode. - Groups and forum topics require an allowed user plus either
AllowedChatIdsor/trustfrom an allowed user in that chat.
/doctor
/project add C:\src\your-repo
/new setup-check
Summarize this repository and tell me the next safest setup check to run.
/tail 80
Use a Unix path on Linux/macOS:
/project add /home/you/src/your-repo
Shows the built-in command summary and navigation buttons.
Syntax:
/help
Expected behavior:
- Replies with the supported command list.
- Adds navigation buttons for
Sessions,Projects, andHelp.
Shows the Telegram identifiers needed for configuration and troubleshooting.
Syntax:
/whoami
Expected behavior:
- Shows Telegram user ID.
- Shows chat ID.
- Shows topic thread ID when sent inside a forum topic.
- Works before the user allowlist is configured so first-time setup can discover IDs.
Do not show /whoami in a public video unless you are comfortable exposing the IDs.
Shows the app version for the currently running Telegram process.
Syntax:
/version
Expected behavior:
- Shows the Incursa Codex Telegram assembly version.
- Helps confirm whether Telegram is talking to the binary you just installed or an older process.
Trusts the current group or forum chat for allowlisted users without copying a chat ID into configuration.
Syntax:
/trust
/trust chat
/trust remove
Expected behavior:
- Works only for users already listed in
TelegramBot:AllowedUserIds. - In a private chat, explains that no chat trust entry is required.
- In a group or forum topic, stores the current chat ID in local Telegram state.
- Allows future commands, callbacks, topic workflows, audio, and attachments from allowlisted users in that chat.
- Allows the trusted chat root and each forum topic to keep separate active project/session state.
/trust removeremoves Telegram-granted trust for the current chat. If the chat is also listed inTelegramBot:AllowedChatIds, configuration still allows it.
Explains the current conversation, routing, project, session, workspace, queue state, and next recommended action.
Aliases:
/diag
/diagnostics
Syntax:
/doctor
Expected behavior:
- Shows whether the user and chat are allowed.
- Shows whether plain text can auto-route.
- Shows known project/session counts and current selections.
- Shows workspace roots and process directory.
- Shows outbound queue counts.
- Ends with a concrete next action.
Use this before changing configuration blindly.
Shows or changes the Telegram debug preamble mode.
Syntax:
/debug
/debug status
/debug on
/debug off
/debug reset
Expected behavior:
/debugor/debug statusshows the effective setting, runtime override, and configuration default./debug onstarts prefixing Telegram text messages with diagnostic metadata./debug offdisables the runtime override./debug resetclears the runtime override and returns toTelegramBot:Outbound:DebugPreambleEnabled.- Preambles include source, chat/topic, session, turn, and active-turn fields when known.
Use this when investigating whether foreground replies, queued work, and live Codex turn output are interleaving.
Trace controls are also available through /debug trace ...:
/debug trace status
/debug trace on
/debug trace off
/debug trace latest
/debug trace on enables local JSONL trace-file writes for this process. In-memory turn diagnostics are still collected for recent turns even when file tracing is off.
Structured interface capture is available through /debug capture ...:
/debug capture status
/debug capture on
/debug capture off
/debug capture full on
/debug capture full on 30m
/debug capture full off
/debug capture latest
/debug capture <traceId>
Expected behavior:
/debug capture onenables metadata capture: Telegram/Codex ids, event kinds, counts, text lengths, attachment metadata, local paths, routing decisions, queue/chunk counts, statuses, and errors./debug capture full onenables full capture for a bounded TTL. Full capture writes redacted message bodies, Codex input text, Codex event bodies, final responses, and outbound Telegram chunk text to local trace files./debug capture full offreturns to metadata capture while trace writing remains enabled./debug capture offdisables trace-file capture for this process. Recent in-memory diagnostics remain available.- Trace files are written as JSONL under
TelegramDebugTrace:TraceDirectorywhen set; otherwise under the configured data root intelegram-traces/yyyyMMdd/<traceId>.jsonl. - Secret-looking values such as authorization headers, tokens, API keys, cookies, and bot tokens are redacted before trace files are written.
- Full capture is intentionally visible in status output so it is not left on accidentally.
- Attachment file copies are only written when full capture is enabled and
TelegramDebugTrace:CaptureAttachmentCopiesistrue. Copies are placed beside the trace file undertelegram-traces/yyyyMMdd/<traceId>.attachments/, and the JSONL event records the copied paths.
Shows local trace and turn-delivery diagnostics.
Syntax:
/trace
/trace latest
/trace <traceId>
/trace status
/trace on
/trace off
/trace reset
Expected behavior:
/trace latestshows the newest in-memory trace diagnostics./trace onand/trace offcontrol trace-file writing for the current process.- Diagnostics distinguish Telegram input receipt, bundling, queueing, steering, Codex send/plan requests, actual Codex turn start, Codex terminal events, and Telegram outbound delivery.
- Diagnostics show Codex event counts, assistant-output character counts, queued outbound characters, sent chunks, pending chunks, compaction, rate limits, timeouts, and last Telegram API/send errors.
/debug capture latestand/debug capture <traceId>reuse the same diagnostics view.
Shows or changes the Telegram output presentation mode.
Syntax:
/output mode
/output mode compact
/output mode verbose
/output mode live
/output mode final
/output mode reset
Expected behavior:
/output modeshows the effective mode and whether it came from configuration or a runtime override.compactsends final output durably and publishes sparse still-working pulses while active work is otherwise quiet.verbosesends progress and update events as durable Telegram messages according to the normal filters.liveuses an editable live turn card for progress/update events while final output remains durable Telegram history.finalsuppresses normal progress/update chatter and sends final output, errors, approval requests, and artifacts.resetclears the runtime override and returns toTelegramOutput:PresentationMode.- The same choices are available from the
Output Modebutton on session cards.
Shows operational turn history retained by the bot.
Syntax:
/turn updates [sessionId] [turnId]
/turn progress [sessionId] [turnId]
/turn full [sessionId] [turnId]
/turn final [sessionId] [turnId]
Expected behavior:
updatesshows user-facing normalized events and omits low-value progress noise.progressshows retained progress history when progress capture is enabled or summarized.fullshows all retained operational events for the turn.finalshows retained final-response events.- The
Show Updates,Show Progress,Show Full Turn, andFinalbuttons use the same operational history path for the selected session. - Use the slash form with an explicit
turnIdwhen inspecting an older turn; button payloads stay compact for Telegram callback limits. - Operational history is not full debug capture. Use
/debug capture full onwhen raw Telegram/Codex interface traffic is needed.
Lists known local project directories.
Syntax:
/projects
Expected behavior:
- Lists projects stored in local state.
- Marks the active project for this Telegram conversation.
- Adds
Usebuttons when projects are available.
Adds a local directory to the project catalog and selects it for the current conversation.
Syntax:
/project add <absolute directory path>
Examples:
/project add C:\src\my-repo
/project add /home/you/src/my-repo
Expected behavior:
- Validates that the directory is under an allowed workspace root.
- Adds the normalized path to local project state.
- Selects the project for the current private chat, group, or topic.
- Rejects paths outside configured workspace roots.
Selects an existing project.
Syntax:
/project <number>
/project <name>
/project <absolute path>
Examples:
/project 1
/project codex-telegram
/project C:\src\my-repo
Expected behavior:
- Selects a matching known project.
- Rejects ambiguous names and asks for a clearer selector.
- Stores the selection for the current conversation.
Shows the active project for the current conversation.
Syntax:
/project current
Expected behavior:
- Shows project name/key/path when a project is selected.
- Gives selection guidance when no project is active.
Creates and selects a new Codex session in the active project.
Syntax:
/new
/new <session name>
Example:
/new release-readiness
Expected behavior:
- Requires an active project.
- Creates a Codex session with the supplied name, or an auto-generated project-based name when omitted.
- Selects it for the current conversation.
- Starts following live output for that session.
- Includes a compact
Rate limitsline when Codex account data is available quickly.
In a private chat, trusted group root, or forum topic, a normal message continues the active session.
Example:
Review the README and tell me the top three setup gaps. Do not edit files.
Expected behavior:
- Uses the selected session when one exists.
- Creates a project-based default session if no session is selected.
- Sends attachments with the prompt when attachments are present.
- With the default
TelegramInput:DefaultCaptureModeofBundleAlways, creates or updates an editable input bundle before starting Codex. - If an operator chooses
ImmediateText, very long plain-text messages still open an input bundle before a turn starts, which keeps Telegram-split prompts together. - The input bundle card shows only the current useful actions, such as Send now, Queue next, Steer current turn, Add more, Clear, and Cancel.
- If
TelegramInput:AutoDispatchAfterSecondsis greater than 0, an open bundle is automatically sent or queued after that many idle seconds with no new captured input. - Telegram albums/media groups are debounced by
TelegramInput:MediaGroupDebounceMillisecondsand forwarded as one inbound bundle candidate with all collected media. - Slash commands remain available as fallbacks.
Cards are the live mobile control surface. Editing a session or input-bundle card does not replace the durable Telegram message history: assistant output is still delivered as normal Telegram messages after a bundle is sent, queued, or steered.
Sends text to the active session.
Syntax:
/send <text>
Example:
/send summarize the current repository state
Expected behavior:
- Routes text to the active session or creates one when allowed.
- Useful when Telegram privacy mode or an unsupported chat type prevents normal auto-routing.
- Keeps immediate send behavior for command fallback use; normal non-command input is captured into an input bundle by default and can be changed with
TelegramInput:DefaultCaptureMode.
Adds guidance to an active turn.
Syntax:
/steer <text>
Example:
/steer focus on the failing test first
Expected behavior:
- Requires an active selected session.
- Sends steering text to the currently active Codex turn.
- Replies with an error if there is no live turn to steer.
- If Codex does not accept the steer request quickly, posts a durable pending message and later reports success or failure.
Use /send for normal new work. Use /steer only while Codex is already working. Steering text is sent immediately and cannot be edited after the bot hands it to Codex; edit queued text first with /queue edit <id> <new text>.
Shows queued prompts submitted by you for the current Telegram conversation.
Syntax:
/queue
/queued
Expected behavior:
- Lists queued prompts in FIFO order for the current private chat, group root, or forum topic.
- Shows the target session, queued age, short queue item ID, prompt preview, and attachment count.
- Adds
Send now,Edit, andDeletebuttons for each listed item. - Keeps the list conversation-scoped by default so queued text from other chats or topics is not shown accidentally.
Shows your queued prompts across Telegram conversations.
Syntax:
/queue all
Expected behavior:
- Lists queued prompts submitted by your Telegram user ID across conversations.
- Adds the conversation label for each queued item.
- Uses the same
Send now,Edit, andDeletebuttons.
Replaces the text for one queued prompt.
Syntax:
/queue edit <id> <new text>
Example:
/queue edit a1b2c3d4 focus only on the failing Linux startup path
Expected behavior:
- Accepts a full queue item ID, an unambiguous prefix, or the current conversation list number.
- Replaces queued text while preserving any queued attachments.
- Rejects unknown, ambiguous, or already-drained items without changing the queue.
Deletes one queued prompt.
Syntax:
/queue delete <id>
Expected behavior:
- Accepts a full queue item ID, an unambiguous prefix, or the current conversation list number.
- Removes only that queued prompt.
- Deletes temporary attachment files owned by that queued prompt.
- Leaves other queued prompts and session-level state untouched.
Removes one queued prompt and sends it as steering input to the active turn.
Syntax:
/queue send <id>
/queue now <id>
/queue steer <id>
Expected behavior:
- Accepts a full queue item ID, an unambiguous prefix, or the current conversation list number.
- Removes the queued prompt before attempting to steer the active turn.
- Sends text and preserved attachments through the active-turn steering path.
- Requeues the item if steering fails, including when no active turn is running.
- If Codex does not accept the steer request quickly, posts a durable pending message and later reports success or requeues on failure.
- Deletes temporary attachment files only after steering succeeds or after the target session is gone.
Lists active and Telegram-managed sessions.
Syntax:
/sessions
Expected behavior:
- Lists active and recently managed sessions.
- Marks the active session with
*. - Shows status and relative last activity.
- Adds
Usebuttons for listed sessions.
Shows recent Codex history, including older idle sessions.
Syntax:
/sessions all
/sessions all <count>
Examples:
/sessions all
/sessions all 20
Expected behavior:
- Includes older idle history.
- Clamps the count to the supported range.
- Adds
Usebuttons for listed sessions.
Selects an existing session for the current conversation.
Syntax:
/use <sessionId>
Example:
/use 019df8e5
Expected behavior:
- Accepts a full session ID or unambiguous prefix.
- Selects the session for this conversation.
- Starts following live output for that session.
- Rejects unknown or ambiguous IDs.
Shows session status.
Syntax:
/status
/status <sessionId>
Expected behavior:
- Defaults to the active session.
- Renders a concise snapshot with active state, current activity, elapsed time when active, queued prompt count, pending Telegram delivery when relevant, output mode, model, and last activity.
- Keeps trace IDs, working directories, detailed delivery counters, and closeout bodies out of the default snapshot; use
/debug,/trace,/outbound, or/turnwhen you need that detail. - Includes a compact
Rate limitsline with five-hour and weekly block percentages and reset times when Codex account data is available. - Shows the last turn closeout when the current process has observed one, including missing-final-response warnings for streamed assistant text.
- Includes buttons for Send/Add Input, Steer, Queue, Refresh, Tail/History, Debug/Trace, Model, Thinking, and Stop/Cancel.
Shows Codex account usage reported by the local Codex app-server.
Syntax:
/usage
Expected behavior:
- Reads Codex account rate-limit data from the local Codex app-server.
- Shows remaining percentage for the five-hour block.
- Shows remaining percentage for the weekly block.
- Shows reset timing and local reset time when Codex reports reset timestamps.
- Fails with clear setup text if the local Codex executable is missing or the app-server does not expose account usage.
Shows recent output for the active session.
Syntax:
/tail
/tail <count>
Examples:
/tail
/tail 80
Expected behavior:
- Defaults to the active session.
- Defaults to 40 recent lines when no count is supplied.
- Starts following live output for the session.
- Adds a session button when applicable.
- Includes recent in-process session events when transcript output alone does not explain the latest turn state.
Shows recent output for a specific session.
Syntax:
/tail <sessionId>
/tail <sessionId> <count>
Example:
/tail 019df8e5 120
Expected behavior:
- Resolves the full session ID or unambiguous prefix.
- Shows recent output for that session.
- Starts following live output for that session in the current conversation.
Shows model settings and model-selection buttons for the active session.
Syntax:
/model
Expected behavior:
- Shows current model and thinking effort.
- Includes a compact
Rate limitsline when Codex account data is available quickly. - Shows available thinking efforts when known.
- Shows up to eight model buttons when available.
- Marks the selected model with
[x].
Changes model settings for the active session.
Syntax:
/model <model>
/model <model> thinking <effort>
/model thinking <effort>
Examples:
/model gpt-5.4
/model gpt-5.4 thinking high
/model thinking xhigh
Supported thinking values:
minimal
low
medium
high
xhigh
Expected behavior:
- Updates the selected session settings.
- Leaves unspecified values unchanged.
- Returns the updated model settings.
- Includes a compact
Rate limitsline when Codex account data is available quickly. - Rejects invalid model or effort values reported by Codex.
Shows thinking-effort buttons for the active session.
Syntax:
/thinking
Expected behavior:
- Shows current model and thinking effort.
- Shows available thinking-effort buttons when known.
- Marks the selected effort with
[x]. - Controls the standard thinking effort for active turns; the bootstrap
Codex runtimemenu exposes a separate plan-mode thinking default.
Changes the thinking effort for the active session.
Syntax:
/thinking <minimal|low|medium|high|xhigh>
Example:
/thinking high
Expected behavior:
- Updates only the thinking effort.
- Leaves the model unchanged.
- Returns the updated model settings.
Asks Codex to plan and clarify before implementation for the active session.
Syntax:
/plan <request>
Example:
/plan review the current session flow and suggest the safest next implementation step
Expected behavior:
- Resolves the active session for the current conversation.
- Sends the request as a Plan mode turn rather than a normal send turn.
- Queues the request when the session is busy, using the same ordering rules as normal prompts.
- Starts the plan-mode flow so Codex can ask follow-up questions when needed.
Answers a pending Plan mode question for the active conversation.
Syntax:
/answer <answer>
Example:
/answer Use the faster implementation path and keep the bootstrap menu change minimal.
Expected behavior:
- Sends the answer to the pending Plan mode question for the active conversation.
- Replies that no Plan mode question is waiting if the conversation has nothing pending.
- Leaves the selected session unchanged.
Shows the current goal for the active session.
Syntax:
/goal
/goal show
Expected behavior:
- Resolves the active session for the current conversation.
- Shows the objective, status, optional token budget, tokens used, time used, and update age when a goal is set.
- Replies that no session goal is set when Codex has no goal for the thread.
- Replies with setup guidance when the connected Codex backend does not support thread goals.
Sets the goal objective for the active session.
Syntax:
/goal <objective>
/goal set <objective>
/goal set <objective> --budget <tokens>
Examples:
/goal get /goal working in the Telegram app
/goal set stabilize this branch --budget 12000
Expected behavior:
- Creates or replaces the active session goal.
- Sets goal status to active.
- Sends an optional token budget when provided.
- Returns the updated goal.
Changes goal state for the active session.
Syntax:
/goal clear
/goal pause
/goal resume
/goal complete
Expected behavior:
/goal clearremoves the goal from the thread./goal pausechanges goal status to paused./goal resumechanges goal status to active./goal completechanges goal status to complete.- Returns the updated goal unless the goal was cleared.
Sets model/thinking and sends a prompt in one message.
Syntax:
Codex settings model <model> thinking <effort>: <prompt>
Example:
Codex settings model gpt-5.4 thinking high: inspect the release docs for gaps
Expected behavior:
- Parses the model/thinking directive.
- Updates the session settings.
- Sends the remaining prompt text to Codex.
Shows outbound Telegram queue status.
Syntax:
/outbound
/outbound status
Expected behavior:
- Shows pending destinations, messages, chunks, and characters.
- Shows global backoff when Telegram rate limits are active.
- Shows pending output for the current chat.
- Use
/trace latestwhen you need to know whether Codex finished, Telegram is still draining, output was compacted, or Telegram send failed.
Only status is implemented as an outbound subcommand.
Gracefully stops a session.
Syntax:
/stop
/stop <sessionId>
Expected behavior:
- Defaults to the active session.
- Requests a graceful stop.
- Clears pending queued prompts for that session.
Hard-stops a session.
Syntax:
/kill <sessionId> confirm
Expected behavior:
- Requires explicit
confirm. - Resolves the full session ID or unambiguous prefix.
- Hard-stops the session.
- Clears pending queued prompts for that session.
Use /stop first unless a session is stuck.
Renames a session.
Syntax:
/rename <sessionId> <new name>
Example:
/rename 019df8e5 release demo
Expected behavior:
- Resolves the session ID.
- Updates the display name.
- Does not change transcript logs.
Hides a stopped or exited session from the managed list without deleting logs.
Syntax:
/forget <sessionId>
Expected behavior:
- Resolves the session ID.
- Removes it from the Telegram-managed session list.
- Does not delete transcript logs.
Explains restart behavior for the standalone process.
Syntax:
/restart confirm
Expected behavior:
- Does not restart the process from Telegram.
- Explains that restart must be handled by the terminal, service manager, scheduled task, or container/runtime supervisor.
Lists topic/session bindings for the current chat.
Aliases:
/threads
/topic list
/topic ls
Expected behavior:
- Lists main-chat and forum-topic bindings known for the chat.
- Shows session summary, project name, and queued prompt count when present.
- Marks the current topic or chat root with
*.
Shows the current topic/session binding.
Syntax:
/topic current
Expected behavior:
- Shows topic thread ID.
- Shows active session status.
- Shows active project status when present.
Creates a new Telegram forum topic and matching Codex session.
Syntax:
/topic new <name>
/topic new <name> | <absolute directory path>
Examples:
/topic new release readiness
/topic new docs polish | C:\src\my-repo
Expected behavior:
- Works only in a forum-enabled supergroup.
- Requires the bot to have the topic-management rights Telegram requires.
- Uses the supplied path when provided and allowed.
- Otherwise uses the active project for the current conversation.
- Creates a Telegram topic and Codex session, then binds them together.
Binds the current forum topic to an existing Codex session.
Syntax:
/topic attach
/topic attach <sessionId>
Expected behavior:
- Must be run inside the forum topic to bind.
- With no session ID, tries the topic's current session first, then the user's private-chat active session.
- With a session ID, resolves the full ID or unambiguous prefix.
- Updates the topic's active session and project binding.
Images and documents can be attached to a routed message.
Expected behavior:
- The file is downloaded to a temporary local path.
- If the input is captured into a bundle or queued for later, the attachment is copied under the configured local data root in
telegram-attachmentsbefore the bundle/queue record is persisted. - The attachment is forwarded to Codex with the prompt, bundle, queued prompt, or steering input when supported.
- Temporary source files are removed after durable copy or after processing when possible.
- If a persisted attachment is missing later, the bot reports the missing attachment instead of silently dropping it.
Voice notes are transcribed before being sent to Codex.
Requirements:
OpenAI:ApiKeyorOPENAI_API_KEY.- A transcription-capable
OpenAI:Model. ffmpegwhen transcoding is needed.- Audio duration inside configured limits.
Suggested first voice prompt:
Please review the current project and tell me the three most important setup risks. Keep it concise and do not edit files.
If a prompt arrives while a session has an active turn, it is queued for that session.
Expected behavior:
- Queued prompts run in order.
- Separate sessions can progress independently.
- Telegram output is rate-limited but queued text items are sent as separate messages.
- Long individual outputs may still be split into multiple Telegram chunks.
- Assistant output is sent as durable Telegram messages/chunks, not by continuously editing the live status card.
- Completed turns append a standalone
~~ fin ~~marker after final output. /tail,/history, and/traceare the authoritative paths when Telegram scrollback or edited cards are not enough.