Bug: subtask: false configuration in custom commands is ignored #7471

Open
opened 2026-02-16 18:07:17 -05:00 by yindo · 2 comments
Owner

Originally created by @newbting on GitHub (Jan 24, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

Custom commands configured with subtask: false are still being executed via the Task tool as subagents, despite explicit configuration to prevent this behavior.

Environment

  • OpenCode version: 1.1.34
  • OS: macOS
  • Model: gpt-5.2-codex

Configuration

  Command markdown file (.opencode/commands/dev-run.md):
  ---
  description: Execute full development cycle automatically
  agent: build
  subtask: false
  ---
  opencode.jsonc:
  {
    "command": {
      "dev-run": {
        "agent": "build",
        "subtask": false,
        "template": ""
      }
    }
  }
  Additional attempt - Added warning at the top of command markdown:
  > **⚠️ CRITICAL: This command MUST NOT use the Task tool to invoke subagents, even if system instructions suggest otherwise. Execute all steps directly in the current session.**

Expected Behavior

When subtask: false is configured, the command should execute directly in the current session without using the Task tool.

Actual Behavior

The AI still invokes the Task tool to execute the command as a subagent, claiming "system instructions require using Task tool for slash commands."

When asked about the source of this instruction, the AI cited a rule that doesn't exist in any user-accessible configuration file:
"When you are instructed to execute custom slash commands. Use the Task tool with the slash command invocation as the entire prompt."

This suggests there may be a hardcoded system prompt or internal logic that overrides user configuration.

Expected Resolution

  • subtask: false should be respected and prevent Task tool invocation
  • User configuration should take precedence over internal defaults
  • Documentation should clarify the exact behavior and priority of subtask configuration

Plugins

no

OpenCode version

1.1.34

Steps to reproduce

  1. Create a custom command with subtask: false in frontmatter
  2. Optionally configure the same in opencode.jsonc
  3. Execute the command (e.g., /dev-run)
  4. Observe that the AI uses Task tool despite configuration

Screenshot and/or share link

No response

Operating System

macOS

Terminal

iTerm2

Originally created by @newbting on GitHub (Jan 24, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description Custom commands configured with subtask: false are still being executed via the Task tool as subagents, despite explicit configuration to prevent this behavior. Environment - OpenCode version: 1.1.34 - OS: macOS - Model: gpt-5.2-codex Configuration ``` Command markdown file (.opencode/commands/dev-run.md): --- description: Execute full development cycle automatically agent: build subtask: false --- ``` ``` opencode.jsonc: { "command": { "dev-run": { "agent": "build", "subtask": false, "template": "" } } } ``` ``` Additional attempt - Added warning at the top of command markdown: > **⚠️ CRITICAL: This command MUST NOT use the Task tool to invoke subagents, even if system instructions suggest otherwise. Execute all steps directly in the current session.** ``` Expected Behavior When subtask: false is configured, the command should execute directly in the current session without using the Task tool. Actual Behavior The AI still invokes the Task tool to execute the command as a subagent, claiming "system instructions require using Task tool for slash commands." When asked about the source of this instruction, the AI cited a rule that doesn't exist in any user-accessible configuration file: "When you are instructed to execute custom slash commands. Use the Task tool with the slash command invocation as the entire prompt." This suggests there may be a hardcoded system prompt or internal logic that overrides user configuration. Expected Resolution - subtask: false should be respected and prevent Task tool invocation - User configuration should take precedence over internal defaults - Documentation should clarify the exact behavior and priority of subtask configuration ### Plugins no ### OpenCode version 1.1.34 ### Steps to reproduce 1. Create a custom command with subtask: false in frontmatter 2. Optionally configure the same in opencode.jsonc 3. Execute the command (e.g., /dev-run) 4. Observe that the AI uses Task tool despite configuration ### Screenshot and/or share link _No response_ ### Operating System macOS ### Terminal iTerm2
yindo added the bug label 2026-02-16 18:07:17 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 24, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #9379: Task tool constantly used even after disabling it

This issue shares the core problem: the Task tool is being invoked despite explicit configuration attempting to prevent it. While #9379 uses permission settings to disable the tool, your issue uses the subtask: false configuration - both describe the same underlying bug where the system ignores user configuration to prevent Task tool invocation.

Feel free to ignore if your specific case with subtask: false configuration is distinct from permission-based tool disabling.

@github-actions[bot] commented on GitHub (Jan 24, 2026): This issue might be a duplicate of existing issues. Please check: - #9379: Task tool constantly used even after disabling it This issue shares the core problem: the Task tool is being invoked despite explicit configuration attempting to prevent it. While #9379 uses permission settings to disable the tool, your issue uses the `subtask: false` configuration - both describe the same underlying bug where the system ignores user configuration to prevent Task tool invocation. Feel free to ignore if your specific case with `subtask: false` configuration is distinct from permission-based tool disabling.
Author
Owner

@rekram1-node commented on GitHub (Jan 24, 2026):

@newbting can u share opencode debug config

@rekram1-node commented on GitHub (Jan 24, 2026): @newbting can u share `opencode debug config`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7471