Skip to content

Add flag or Env to disable subagent #55

Description

@hjfghycvdt

The reason is that sometimes the sub-agent fails to return any results, which only wastes tokens.Screenshot.png

Activity

  1. Blankeos commented on Oct 3, 2026

    @Blankeos
    Owner

    This is already supported through the existing OpenCode-compatible permissions config, so a separate flag/environment variable is not needed. Add permission at the top level of your project crabcode.jsonc (or add task to your existing permission object):

    {
      "permission": {
        "task": "deny"
      }
    }

    This prevents automatic subagent delegation: the Task tool is excluded from the model’s available tools, and configured-deny rules reject attempted Task calls before execution. Verified on current main with JSONC loading, tool filtering, and permission-preflight tests; the same parsing/filtering/deny implementation is also present in the v0.0.13 release source.

    As in OpenCode, explicit manual @agent invocation remains available. Per-agent permission overrides take precedence over global rules, so remove any explicit per-agent Task allow rule if you want all primary agents to stop delegating automatically.

    We are closing the proposed flag/env PR #61 as unnecessary in favor of this existing configuration interface. If this config does not stop automatic delegation in your installed version, please share your Crabcode version and relevant permission/agent config so we can investigate.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions