anomalyco / anomalyco/opencode
Skill commands appear in random order in the slash command picker
Open
@neriousy is already working on this.
Since Aug 19, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
In the desktop app (and TUI) slash command picker, skills are listed in a random/non-deterministic order instead of alphabetical order. The order changes between sessions because skill loading is fully concurrent.
Root cause
command.list()inpackages/opencode/src/command/index.tsreturnsObject.values(s.commands)with no sorting.- Skills are appended to the commands map from
skill.all(), which returnsObject.values(s.skills)unsorted (packages/opencode/src/skill/index.ts). - Skill frontmatter parsing happens with
concurrency: "unbounded", so the insertion order (and therefore the displayed order) is nondeterministic.
Meanwhile the model-facing listing (Skill.available() / fmt()) already sorts alphabetically via toSorted((a, b) => a.name.localeCompare(b.name)), so the inconsistency is only in the UI path.
Reproduction
- Run opencode desktop (or TUI) with multiple installed skills.
- Type
/to open the slash command picker. - Observe skill entries appear in arbitrary order, varying across restarts.
Expected behavior
Skills (ideally all commands) are listed in deterministic alphabetical order.
Suggested fix
Sort in command.list():
const list = Effect.fn("Command.list")(function* () {
const s = yield* InstanceState.get(state)
return Object.values(s.commands).toSorted((a, b) => a.name.localeCompare(b.name))
})
Environment
- opencode latest
- macOS desktop app
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.