anomalyco / anomalyco/opencode
[FEATURE]: Desktop client: intercept built-in slash commands (/new, /clear) in the input
@Brendonovich is already working on this.
Since Sep 6, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- Avg merge
- 7h 2m
- Merged PRs (30d)
- 384
Description
Environment
- T3 Code desktop client (Electron, Alpha channel), macOS arm64
- opencode CLI 1.18.29 (in the terminal TUI,
/clearand/newboth work) - Provider: OpenRouter (GLM), i.e. a non-Claude, provider-agnostic session
Expected
The docs list /clear as an alias of /new ("Start a new session", ctrl+x n). Typing /clear or /new in the desktop app input should start a new session.
Actual
The desktop input passes slash commands through to the model as plain user messages: nothing is intercepted, and the session keeps its full context. Verified against the shipped app bundle (app.asar, ~194MB):
- Zero occurrences of
"/clear","/help","/compact",name:"clear",name:"new"; the single"/new"string is a doc-comment example - All
aliases:[...]arrays in the bundle are syntax-highlighting language tags - The only slash-related schema is
ServerProviderSlashCommand(provider-advertised commands); an OpenRouter provider registers none - The server dist has no slash command registry at all
So the built-in commands documented for the TUI have no desktop-input equivalent, and config-defined custom commands (command/*.md) cannot fill the gap, because the client never executes commands.
Request
Intercept built-in commands in the desktop input, at minimum /new and /clear. Longer term, surfacing custom commands (command/*.md) the way the TUI does would make the clients feature-equal.
Note
The current passthrough is genuinely useful and worth preserving: typing /skill-name reaches the agent, which loads and runs that skill. Suggested rule: registered command names intercept; anything else falls through to the agent as a prompt.
Related closed issues (same-session /clear semantics, shipped for the TUI): #19499, #1368
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.
Assessment
This issue has not been assessed yet.