Bug
Micode agents (planner, executor, codebase-locator, implementer, reviewer, etc.) define no permission field in their AgentConfig. When a project's opencode.json sets root-level permission denies (e.g. "task": "deny"), all micode agents inherit those denies and become non-functional — they spawn but return empty results because they can't use any tools.
Reproduction
- Have a project
opencode.json with root permission denies:
{
"plugin": ["micode"],
"permission": {
"task": "deny"
}
}
- Try to use any micode agent via Task tool (planner, executor, codebase-locator, etc.)
- Agent spawns, returns empty result, no tool calls made
Root Cause
In src/agents/*.ts, none of the agent configs include a permission block. The AgentConfig type supports:
permission?: {
edit?: "ask" | "allow" | "deny";
bash?: ("ask" | "allow" | "deny") | { [key: string]: "ask" | "allow" | "deny" };
webfetch?: "ask" | "allow" | "deny";
doom_loop?: "ask" | "allow" | "deny";
external_directory?: "ask" | "allow" | "deny";
};
When no permission is declared, agents inherit from the project's root config. A root "task": "deny" (or any tool deny) effectively kills all micode agents.
Native OpenCode agents (like build, plan) that users define in their opencode.json under "agent" work fine because they have explicit permission overrides. Micode agents have no such overrides.
Expected Behavior
Micode agents should either:
- Declare sensible default permissions in their
AgentConfig so they work out-of-the-box regardless of root config, OR
- Document that users must add permission overrides in their
opencode.json for each micode agent
Option 1 is ideal — each agent should declare the permissions it needs:
- planner:
read: allow, glob: allow, grep: allow, bash: allow (for research)
- executor:
edit: allow, write: allow, bash: allow, task: allow (to spawn implementers)
- codebase-locator:
read: allow, glob: allow, grep: allow
- implementer:
edit: allow, write: allow, read: allow, bash: allow
- reviewer:
read: allow, bash: allow (limited)
Workaround
Add permission overrides in the project's opencode.json:
{
"agent": {
"planner": { "permission": { "edit": "allow", "bash": "allow" } },
"executor": { "permission": { "edit": "allow", "write": "allow", "bash": "allow", "task": "allow" } },
"codebase-locator": { "permission": { "read": "allow", "glob": "allow", "grep": "allow", "bash": "allow" } },
"implementer": { "permission": { "edit": "allow", "write": "allow", "read": "allow", "bash": "allow" } },
"reviewer": { "permission": { "read": "allow", "bash": "allow" } }
}
}
Environment
- micode: 0.10.0
- OpenCode: latest
- OS: Fedora 43 (Podman toolbox container)
Related
Bug
Micode agents (planner, executor, codebase-locator, implementer, reviewer, etc.) define no
permissionfield in theirAgentConfig. When a project'sopencode.jsonsets root-level permission denies (e.g."task": "deny"), all micode agents inherit those denies and become non-functional — they spawn but return empty results because they can't use any tools.Reproduction
opencode.jsonwith root permission denies:{ "plugin": ["micode"], "permission": { "task": "deny" } }Root Cause
In
src/agents/*.ts, none of the agent configs include apermissionblock. TheAgentConfigtype supports:When no
permissionis declared, agents inherit from the project's root config. A root"task": "deny"(or any tool deny) effectively kills all micode agents.Native OpenCode agents (like
build,plan) that users define in theiropencode.jsonunder"agent"work fine because they have explicit permission overrides. Micode agents have no such overrides.Expected Behavior
Micode agents should either:
AgentConfigso they work out-of-the-box regardless of root config, ORopencode.jsonfor each micode agentOption 1 is ideal — each agent should declare the permissions it needs:
read: allow,glob: allow,grep: allow,bash: allow(for research)edit: allow,write: allow,bash: allow,task: allow(to spawn implementers)read: allow,glob: allow,grep: allowedit: allow,write: allow,read: allow,bash: allowread: allow,bash: allow(limited)Workaround
Add permission overrides in the project's
opencode.json:{ "agent": { "planner": { "permission": { "edit": "allow", "bash": "allow" } }, "executor": { "permission": { "edit": "allow", "write": "allow", "bash": "allow", "task": "allow" } }, "codebase-locator": { "permission": { "read": "allow", "glob": "allow", "grep": "allow", "bash": "allow" } }, "implementer": { "permission": { "edit": "allow", "write": "allow", "read": "allow", "bash": "allow" } }, "reviewer": { "permission": { "read": "allow", "bash": "allow" } } } }Environment
Related