-
Notifications
You must be signed in to change notification settings - Fork 246
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Summary
When using Maestro with opencode, slash commands configured for opencode are not recognized when typed in chat. The input appears to be treated as regular user text rather than an agent-native slash command.
Repro (Desktop)
- Create/use an opencode session.
- Configure an opencode native slash command in the tool (or environment, plugin/config depending on how it is registered).
- In Maestro chat, type
/your-command .... - Observe: the command does not execute as a slash command in opencode and is handled as normal message flow.
Suspected root cause
This appears to be by design in current code paths:
- Opencode is currently marked as not supporting native slash commands:
src/main/agents/capabilities.ts(opencodeblock):supportsSlashCommands: false.
- Slash-command discovery IPC is hard-gated to Claude Code only:
src/main/ipc/handlers/agents.ts(agents:discoverSlashCommands) returnsnullwhenagentId !== 'claude-code'.- This means
activeSession.agentCommandscan never be populated for opencode via this route.
- UI only exposes discovered agent commands when the capability flag is true:
src/renderer/App.tsxaroundagentCommands = hasActiveSessionCapability('supportsSlashCommands') ? ... : [].
- Input handling for slashes only treats:
- built-in Maestro
/history,/wizard,/skills(Claude-only), - plus
customAICommands. - unmatched slash input falls through to normal message flow, which then gets wrapped as user prompt text.
- In
src/renderer/hooks/input/useInputProcessing.ts, non-command path eventually buildseffectivePromptand appendsmaestroSystemPromptfor new sessions.
- In
Why this breaks opencode slash workflows
If opencode depends on raw slash-prefixed commands from chat, it currently receives a normal prompt text path (and may be prefixed in new sessions), so native command dispatch is never triggered.
Probable fixes (ranked)
- Add opencode slash-command discovery path
- Implement discovery for opencode if/where it exposes configured commands (likely not via Claude init event).
- Store result on session
agentCommands. - Gate execution path by capability only when this is true for opencode.
- Add passthrough execution path for configured opencode slash commands
- If command is recognized as agent-native, send raw command input through the same message queue as a command item instead of converting to a normal text prompt.
- Avoid wrapping with
maestroSystemPromptfor this special case.
- Clarify expected behavior in docs
- If opencode does not support native slash commands in Maestro’s batch mode, make that explicit in
docs/provider-notes.mdanddocs/slash-commands.mdas a known limitation.
Notes
- There is existing parser support for opencode output (
src/main/parsers/opencode-output-parser.ts), but command discovery/execution is currently blocked by capability/design guards.
Suggested acceptance
- With configured opencode slash command
/foo, command appears in autocomplete (if discoverable) and executes without being wrapped by Maestro system prompt. - Commands configured but unsupported should fail with clear feedback, not be treated as normal text silently.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working