-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Open
Labels
bugSomething isn't workingSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)Anything pertaining to core functionality of the application (opencode server stuff)webRelates to opencode on web / desktopRelates to opencode on web / desktopwindows
Description
Description
Summary
Task / subagent invocation is failing in OpenCode Desktop with:
code: "invalid_format"message: "Invalid string: must start with \"prt\""path: ["id"]
This affects both:
- generic task subagents (
subagent_type: "general") - plugin-provided subagents (for example
beads-task-agentfromopencode-beads)
At this point the issue appears to be in OpenCode's task/subagent subsystem rather than in a specific third-party plugin.
Reproduction
Minimal reproduction from the running environment:
- Open OpenCode Desktop
- Invoke the
Tasktool with a basic general subagent request - It fails immediately with schema validation error
Example failing invocation:
subagent_type: "general"- prompt:
Reply with exactly: general-task-ok
Observed result:
[
{
"origin": "string",
"code": "invalid_format",
"format": "starts_with",
"prefix": "prt",
"path": ["id"],
"message": "Invalid string: must start with \"prt\""
}
]
The same error also happens for subagent_type: "beads-task-agent".
Expected behavior
Task with subagent_type: "general" should succeed
plugin-provided subagents should also succeed
OpenCode should not reject message/task IDs with this validation error during subagent creation
What we already ruled out
We did a fairly deep isolation pass:
Verified working
tool bridge works
bash works
read works
Beads CLI works:
bd version
bd ready --json
bd prime
dolt works
Plugins/config isolation already performed
We removed or isolated all of these during debugging:
kdco/background-agents@latest
@spoons-and-mirrors/subtask2@latest
@tarquinen/opencode-dcp@latest
opencode-beads@0.6.0
Most important finding:
Task still fails with the same prt validation error even when opencode-beads is removed from the merged config
so this does not appear to be caused solely by the Beads adapter
Additional local issues we already fixed
We found and fixed two local plugin bugs on our side:
a plugin returning undefined into .length checks
helper modules incorrectly placed in the plugin root and being loaded as plugins
Those fixes restored the normal tool bridge, but did not fix Task.
Relevant logs
The sidecar logs consistently show the failure at message creation time:
createUserMessage
invalid_format
prefix: "prt"
path: ["id"]
It looks like a message/subagent object is being validated with an ID format that the runtime expects to start with prt, but the created/forwarded object does not satisfy that schema.
Notes
This blocks all subagent-based workflows, not just Beads. Because general fails too, this currently looks like an OpenCode core issue in task/subagent plumbing.
If helpful, I can provide:
exact resolved config from opencode-cli.exe debug config
full recent desktop log excerpt
the narrowed plugin matrix we tested
## Environment
- OpenCode Desktop: `1.2.27`
- Platform: `Windows 11`
## Steps to reproduce
1. Launch OpenCode Desktop on Windows 11 in the workspace `D:\skills`
2. Confirm that `opencode-cli.exe debug config` shows a clean merged config with no `opencode-beads`, `subtask2`, `opencode-dcp`, or `background-agents`
3. Invoke the `Task` tool with:
- `subagent_type: "general"`
- prompt: `Reply with exactly: general-task-ok`
4. Observe the error:
- `Invalid string: must start with "prt"`
- `path: ["id"]`
Optional additional confirmation:
5. Invoke the `Task` tool with:
- `subagent_type: "beads-task-agent"`
- prompt: `Reply with exactly: beads-task-ok`
6. Observe the same error
## Expected behavior
- `Task` with `subagent_type: "general"` should succeed
- plugin-provided subagents should also succeed
- subagent/task message creation should not fail schema validation on `id`
Why I believe this is an OpenCode issue
the failure affects general, not just a third-party subagent
it reproduces after removing known message-transforming plugins from the merged config
standard tools continue to work, while only Task / subagent creation fails
Additional data available on request
I can provide:
exact output of opencode-cli.exe debug config
recent desktop sidecar log excerpts
the exact plugin isolation sequence used to narrow this downReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)Anything pertaining to core functionality of the application (opencode server stuff)webRelates to opencode on web / desktopRelates to opencode on web / desktopwindows