anomalyco / anomalyco/opencode

web: custom slash commands expand to full prompt in transcript, hide original shorthand

Open
#49,396 2 comments 0 reactions 1 assignee View on GitHub

@simonklee is already working on this.

Since Sep 16, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Summary

Custom slash commands (e.g. /loop ...) are expanded to their full prompt template text in the session transcript. The original shorthand I typed is lost, making history hard to scan. Prefer showing the shorthand with the expanded text collapsible.

Environment

  • opencode version: 2.0.3
  • OS: Linux omarchy 7.2.3-arch1-3 #1 SMP PREEMPT_DYNAMIC Sun, 06 Sep 2026 13:01:04 +0000 x86_64 GNU/Linux
  • Terminal: TERM=xterm-256color
  • Shell: /usr/bin/fish
  • Install/channel: latest
  • Active plugins: local plugins found (fileview.ts, loop-manager.ts in ~/.config/opencode/plugins/), no registry plugin entries in opencode.json

Reproduction

  1. Define a custom command with $ARGUMENTS, e.g. ~/.config/opencode/commands/loop.md containing User request: $ARGUMENTS + instructions.
  2. In TUI, type /loop my recurring task and submit.
  3. Observe transcript message.

Expected Behavior

Transcript should show what I typed (/loop my recurring task), with the expanded full prompt available as collapsible / expandable detail, or via toggle/setting.

Actual Behavior

Transcript shows the translated/expanded full prompt text instead of /loop my recurring task. Original shorthand is not visible, so scanning history shows verbose template text rather than concise commands.

Additional Context

  • Consistently reproducible.
  • Custom commands affected, e.g. /loop, /advisor, /done from ~/.config/opencode/commands/.
  • Example template: Load the loop-manager skill and follow it. User request: $ARGUMENTS ...
  • Workaround tried: none — have to mentally map expanded text back to shorthand.
  • Preference: shorthand + collapsible expanded view, or a config option in cli.json to choose display mode.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.