Skip to content

task tool missing from tool list despite permission.task being explicitly allowed #39086

Closed as not planned

Description

@mohammadvaladkhani

Environment

  • OpenCode Desktop (installer-based install, not CLI/npm)
  • Custom OpenAI-compatible provider (@ai-sdk/openai-compatible) pointed at a local proxy
  • Windows

What I did

I set up a primary agent with two subagents. The primary agent's config granted permission.task access to both subagent names explicitly, something like:

"permission": {
  "task": {
    "subagent-one": "allow",
    "subagent-two": "allow",
    "*": "deny"
  }
}

Both subagents were defined with mode: subagent and their own restricted permissions (no edit/bash/write).

I tried this two ways:

  1. As a fully custom primary agent defined in opencode.json.
  2. As an override of the built-in build agent (same prompt and permission block, just placed under agent.build instead of a custom agent name), on the assumption that built-in agents might not hit the same limitation as custom ones.

Expected behavior

The primary agent should have a task tool available so it can actually delegate to the two subagents as independent calls.

Actual behavior

In both cases, the model's own tool list comes back as:

bash, edit, glob, grep, read, skill, todowrite, webfetch, write

No task tool anywhere, regardless of the permission.task config. This isn't the model guessing wrong — it genuinely doesn't have the tool, and it reports that plainly when asked to delegate. Same result whether the agent is custom or an override of build.

Related report

There's an existing open issue describing what looks like the same underlying problem for markdown-defined custom agents ("Custom agents cannot access task tool despite frontmatter configuration"), where tools: { task: allow } / permission: { task: allow } in frontmatter doesn't expose the tool even on mode: primary/all. My case adds one data point beyond that: it also happens when overriding the built-in build agent through opencode.json rather than defining a new markdown agent, so the scope might be wider than currently tracked.

Things worth checking during triage (not confirmed, just flagging)

  • Whether task exposure depends on some internal flag that a config-defined mode: primary agent doesn't actually get, even though it's functionally "primary."
  • Whether using a custom OpenAI-compatible provider instead of a native Anthropic/OpenAI provider affects whether task gets included in the tool schema sent to the model.
  • subagent_depth defaults to 1, but that shouldn't matter here since this is failing at the very first level of delegation, not a nested one.

Happy to share full config/logs if it helps narrow this down — let me know if this looks like the same root cause as the linked issue or something separate.

Activity

  1. github-actions commented on Jul 27, 2026

    @github-actions
    Contributor

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

  2. MeseizGit commented on Jul 29, 2026

    @MeseizGit

    I'm running into the exact same issue. Exact same diagnosis. Trying to only use build, explore and general doesn't fix it, the model won't call those since it can't use tools it doesn't have access to. By asking the model to list its set of tools we can see that task is indeed missing.

  3. github-actions commented on Sep 27, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions