[PR #9606] fix: pass arguments to commands without explicit placeholders #13163

Closed
opened 2026-02-16 18:18:02 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/9606

State: closed
Merged: Yes


Fixes #9587

Arguments passed to custom commands were silently ignored if the command template didn't include $1, $2, or $ARGUMENTS placeholders. Also adds support for multi-line input after commands.

Context: https://x.com/__morse/status/2003830333205323835

Users coming from other tools expect to pass extra content after a command and have it appended to the prompt, like:

/review

focus on security issues

Previously this extra content was silently dropped unless the command explicitly used $ARGUMENTS. Now commands without placeholders will automatically receive user arguments appended to the template.

Changes:

  • TUI: Parse command from first line only, preserve newlines in arguments
  • Backend: Auto-append arguments to template if command has no placeholders
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/9606 **State:** closed **Merged:** Yes --- Fixes #9587 Arguments passed to custom commands were silently ignored if the command template didn't include `$1`, `$2`, or `$ARGUMENTS` placeholders. Also adds support for multi-line input after commands. Context: https://x.com/__morse/status/2003830333205323835 Users coming from other tools expect to pass extra content after a command and have it appended to the prompt, like: ``` /review focus on security issues ``` Previously this extra content was silently dropped unless the command explicitly used `$ARGUMENTS`. Now commands without placeholders will automatically receive user arguments appended to the template. Changes: - TUI: Parse command from first line only, preserve newlines in arguments - Backend: Auto-append arguments to template if command has no placeholders
yindo added the pull-request label 2026-02-16 18:18:02 -05:00
yindo closed this issue 2026-02-16 18:18:02 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13163