MiniMax-AI / MiniMax-AI/minimax-code
/status should report context window usage (used / max KB + percentage)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 141
- Avg merge
- 2h 45m
- Merged PRs (30d)
- 46
Description
Summary
The /status slash command (available in Telegram and other IM bridges) currently shows routing/binding info but no information about how full the current session's context window is. Users have no easy way to tell when a /new (or /clear) is advisable before the model starts forgetting things or refusing turns.
Current behavior
/status output (from ChannelSlashCommandHandler.handleStatus, daemon.js ~line 354157):
Platform: telegram
Chat: p2p (<chatId>)
Client: (default)
Agent: mavis
Strategy: root
Rule: (default)
Status: active
Session: mvs_xxx
Pinned: no
There is no signal about context consumption.
Proposed change
Add context usage to the /status reply, e.g.:
Context: 38.2k / 200.0k tokens (19%)
(k/M formatting for readability. Numbers from whatever the runtime already tracks for input-token accounting — no need to invent new metrics.)
Why it matters
- Users running long sessions in Telegram have no warning before context fills up.
- It pairs naturally with
/new//clear— same chat, two complementary controls. - Useful for support and debugging "the bot forgot what we said 10 messages ago" reports.
Acceptance criteria
/statusin Telegram (and Feishu, etc.) showsContext: <used> / <max> (<percent>%)when a session is bound.- When usage data isn't available, the line is omitted (no error, no fake zero).
- No regression in existing
/statuslines.
Environment
- Mavis Code (macOS), latest.
- Telegram bridge,
rootsession strategy.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at ChannelSlashCommandHandler.handleStatus in daemon.js around line 354157, then trace the runtime's existing input-token accounting and session context limits. Verify how status replies are shared across Telegram, Feishu, and other bridges. Done means bound sessions show formatted used/max context and percentage, unavailable data omits the line, and existing status lines remain unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100