Every tool allowance is a trust boundary. Know the matrix before opening the gates.
Tool Capability Matrix
Overview
This reference skill documents ALL tools available in the Hivemind ecosystem across three categories: native OpenCode built-in tools, Hivemind custom harness tools (from hivemind npm package), and MCP-provided external tools. It provides per-depth typical permission patterns derived from the actual 56 agent definitions in .opencode/agents/, and documents lineage-specific tool rules.
Purpose: When configuring agent permissions, designing delegation boundaries, or auditing tool exposure, use this matrix to make consistent, lineage-compliant decisions.
This skill documents — it does not configure. Route actual permission changes through hf-meta-builder or opencode-config-workflow.
On Load
Identify the agent depth (L0/L1/L2/L3) and lineage (hm/hf/gate/stack/unprefixed)
Scan the per-depth matrix for the agent's typical tool allowances
Check the per-lineage rules for cross-lineage restrictions
If designing a new agent, use the Per-Depth Typical Permissions section as a starting template
Verify any proposed tool allowances against the lineage rules before finalizing
Part 1: Complete Tool Catalog
1A. Native OpenCode Tools
These are built into every OpenCode runtime. Always available unless explicitly denied.
Tool
Category
Permissions
Glob/Pattern Support
Description
read
Read
allow/ask/ask
Yes (file path)
Read file contents. Supports line ranges. .env files denied by default.
grep
Read
allow/ask/ask
Yes (regex)
Search file contents using regex. Respects .gitignore via ripgrep.
glob
Read
allow/ask/ask
Yes (glob patterns)
Find files by pattern matching. Returns paths sorted by modification time.
list
Read
allow/ask/ask
Yes (directory path)
List files and directories. Supports glob filtering.
external_directory — triggered when any tool touches paths outside the working directory. Default: ask.
doom_loop — triggered when the same tool call repeats 3+ times with identical input. Default: ask.
edit covers ALL file modification tools: edit, write, patch, multiedit.
1B. Hivemind Custom Tools (hivemind)
These are registered by the hivemind npm package plugin. Available when the plugin is loaded in opencode.json.
Tool
Source File
Category
Permissions
Description
delegate-task
src/tools/delegate-task.ts
Delegation
allow/ask/ask
Delegate work to a specialist agent via SDK child-session dispatch. Always-background WaiterModel. Returns delegation ID immediately.
delegation-status
src/tools/delegation-status.ts
Delegation
allow/ask/ask
Check delegation status and retrieve results. Query by delegation ID or filter by status.
run-background-command
src/tools/run-background-command.ts
Execution
allow/ask/ask
Run CLI commands in shared background PTY sessions with queue-governed dispatch, output reads, interactive input, and termination.
session-journal-export
src/tools/session-journal-export.ts
Persistence
allow/ask/ask
Export bounded Session Journal and Execution Lineage quick-read summaries as JSON or Markdown.
prompt-skim
src/tools/prompt-skim/
Analysis
allow/ask/ask
Fast scan of prompt content: count words/lines/tokens, extract URLs, verify file paths, calculate complexity score.
prompt-analyze
src/tools/prompt-analyze/
Analysis
allow/ask/ask
Deep prompt analysis: contradictions, vagueness, missing scope, clarity signals.
session-patch
src/tools/session-patch/
Mutation
allow/ask/ask
Patch specific sections in a session file with backup.
configure-primitive
src/tools/configure-primitive.ts
Configuration
allow/ask/ask
Configure, read, list, or inspect OpenCode primitives (agent, command, skill). Supports compile/decompile from JSON/YAML with dry-run preview.
validate-restart
src/tools/validate-restart.ts
Validation
allow/ask/ask
Validate that compiled OpenCode primitives are discoverable and free of runtime issues after restart. Checks circular deps, missing refs, permission inheritance breaks.
nl-route
(harness-native)
Routing
allow/ask/ask
Route a natural language request to one of three test commands (test-echo, test-list, test-status).
1C. MCP-Provided Tools (External Providers)
These tools are available when their MCP servers are configured in opencode.json. Availability depends on API keys and server configuration.
Note: MCP tool names use the mcp__server__tool or server_tool format depending on the MCP transport. Actual tool names in your environment may differ. Use list or check MCP server configuration for exact names.
1D. Special Permission Guards
Guard
Default
When Triggered
Controls
external_directory
ask
Any tool touches paths outside working directory
All file-system tools (read, edit, bash, glob, grep, list)
doom_loop
ask
Same tool call repeats 3+ times with identical input
All tools
read → *.env
ask
Reading .env files
read tool specifically
Part 2: Per-Depth Typical Permissions
Derived from the actual 56 agent definitions in .opencode/agents/. Use these as starting templates when designing new agents.
L0 (Orchestrator — Primary, front-facing)
L0 orchestrators coordinate multi-agent workflows. They route, they do not implement.
Tool
Typical
Rationale
read
allow
Read project context, plans, state files
edit
ask
Orchestrators do not modify files
write
ask
Orchestrators do not create files
bash
ask (all)
No shell execution; delegate to L1/L2
glob
allow
Discover project structure
grep
allow
Search codebase for context
task
allow (specific agents)
Primary function: dispatch L1 coordinators
delegate-task
allow
Harness delegation with tracking
delegation-status
allow
Monitor dispatched tasks
skill
allow
Load coordinator skills
Actual L0 agent examples:hm-l0-orchestrator, hf-l0-orchestrator, gsd-executor
gate-* Lineage (Internal Quality Gates) — INTERNAL ONLY
gate-* skills are THIS PROJECT ONLY (not shipped).
They are internal quality verification gates.
gate-* skills:
✅ May be loaded by hm-* and hf-* agents (as quality checks)
✅ Run as read-only evaluations
✅ Produce scorecards and evidence reports
❌ May NOT modify code
❌ May NOT delegate to other agents
❌ Are NOT included in shipped npm package
Based on actual agent definitions in .opencode/agents/ (April 2026):
Depth
Count
Tool Pattern
L0 Primary
2 (hm, hf)
read+glob+grep+task+skill; no edit/write/bash
L1 Coordinator
2 (hm, hf)
read+glob+grep+task(specific)+bash(git,node); no edit/write
L2 hm Specialist
44
Domain-specific: read-only (researchers/reviewers) or read-write (executors/builders); bash restricted to git+node+npx
L2 hf Specialist
10
read+edit/write(scoped to .opencode/)+bash(git,node)+glob+grep; task denied or restricted
GSD Agents
33
Varies by role; gsd-executor has full read-write; gsd-code-reviewer is read-only
Key observation: 0 out of 56 agents have unrestricted bash permission. All bash access is pattern-restricted.
Anti-Patterns
Anti-Pattern
Detection
Correction
The Gate-Opener — allowing unrestricted bash to L2 agents
bash: allow without patterns
Restrict to git *, node *, npm *, npx *
The Cross-Lineage Breaker — hm agent loading hf skill
hm agent frontmatter includes hf-* in skills array
Remove hf-* skills; cross-lineage access is hf→hm only
The Delegation Leaker — L2 agent allowed to delegate via task
task: allow on read-only agent
Set task: "*": ask for all L2 specialists
The File-Scoper — edit allowed on entire project
edit: allow without path restriction
Scope to specific directories: .opencode/**, src/**
The Harness Abuser — L2 agent using delegate-task
delegate-task: allow on specialist agent
ask all harness delegation tools on L2
The Blind Agent — no read permission but expected to analyze code
read: ask on researcher agent
Always allow read on any agent expected to read code
Self-Correction
Mode 1: Permission Too Restrictive (Agent Cannot Function)
Is the agent failing with "permission denied" errors?
├── Check the tool name in the error → is it needed for the agent's domain?
│ ├── YES → Add a granular allow rule scoped to the specific use case
│ ├── NO → The agent is attempting unauthorized work → flag for review
│ └── UNCLEAR → Check the agent's skills list and role description
└── After adding permission → verify the agent can complete its task
Example: Researcher agent getting webfetch: ask errors. If research-domain agent, add webfetch: allow. If execution-domain agent, ask is correct — the agent is straying from its domain.
Mode 2: Permission Too Permissive (Agent Has Unnecessary Access)
Is the agent using tools outside its domain?
├── Audit successful tool calls → which tools are used?
├── Check for unused tool permissions → list tools allowed but never called
│ ├── UNUSED → Remove the permission (principle of least privilege)
│ └── RARELY USED → Consider ask instead of allow
└── Check for cross-lineage tool usage → hm agent using hf tools?
└── YES → Violation. Remove the tool and route the task.
Mode 3: Lineage Boundary Violation
Is this an hm agent attempting meta-builder work?
├── Agent tried to load hf-* skill → BLOCK. Route to hf-orchestrator.
├── Agent tried to use configure-primitive → BLOCK. Route to hf-meta-builder.
├── Agent tried to use validate-restart → BLOCK. Route to hf-meta-builder.
├── Agent tried to delegate to hf-* agent → BLOCK. Cross-lineage delegation is hf→hm only.
└── Agent is doing meta-concept work → Route user to hf lineage.
Mode 4: MCP Tool Availability Confusion
Agent expected MCP tool but it's not available?
├── Check opencode.json for the MCP server configuration
├── Check if the required API key is set (env var)
│ ├── NOT SET → MCP tools from that provider are not available
│ └── SET → Check MCP server is running; restart OpenCode if needed
├── Check if the tool name matches the actual MCP naming convention
│ └── MCP tools may use mcp__provider__tool or provider_tool format
└── If tool is confirmed unavailable → redesign without it or add the provider
Maximum Correction Attempts
3 per permission configuration cycle. After 3 correction cycles without resolution:
Document the agent's domain and the specific permission gap
Escalate to manual review with the matrix as context
Validation Loop
do → audit → fix → repeat
1. AUDIT: Read the target agent's frontmatter permissions
2. COMPARE: Check each allowed tool against this matrix (depth + lineage rules)
3. DETECT: Flag violations (cross-lineage, overly permissive, missing required)
4. FIX: Apply granular rules following the templates in Section 4
5. VERIFY: Confirm the agent can perform its domain tasks
Cross-References
Skill
Relationship
hm-l3-opencode-platform-reference
Source for native tool permissions documentation
hm-l3-subagent-delegation-patterns
Delegation patterns that depend on correct tool permissions
hf-l2-naming-syndicate
Naming rules for agents whose tools this matrix covers
hf-l2-delegation-gates
Authorization gates that use tool permissions as enforcement
opencode-config-workflow
Configuration workflow for applying permission rules
Success Criteria
All 17 native OpenCode tools documented with permission levels and pattern support
All 10 Hivemind custom tools documented with source files and descriptions
13 MCP provider groups documented with key tools and auth requirements