anomalyco / anomalyco/opencode

Grok always fabricates UUID task_id values, preventing subagents from starting

Open
#49,599 1 comment 0 reactions 1 assignee View on GitHub

@neriousy is already working on this.

Since Sep 17, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

Grok 4.5 repeatedly passes a random UUID as task_id when calling the task tool for a new subagent, even though task_id is optional and the prompt explicitly tells it to omit the field.

This may be post-processing in the xAI API rather than normal model behavior. System-prompt instructions do not fix it. After each failure, Grok states that it will omit task_id, but the next tool call still contains a new UUID.

OpenCode then fails before creating the child session:

Expected a string starting with "ses", got "ff120f9f-a28d-4d29-b691-b3a5f770759b"

Can OpenCode treat an invalid task_id like a missing task session and create a new child? This would work around the provider behavior while preserving valid ses_* IDs for resume.

This is the same OpenCode failure path reported in #37440. Its fix PR, #37438, was closed by automated cleanup and did not merge. #37440 was then auto-closed after 60 days.

Plugins

@subrouter/opencode, Kimaki OpenCode plugin. Subrouter passes provider tool-call streams through without rewriting arguments.

OpenCode version

1.18.31

Steps to reproduce

  1. Use Grok 4.5 through the xAI Responses API.
  2. Ask the primary agent to start an explore or oracle subagent.
  3. Tell the model to omit task_id because this is a new task.
  4. Observe that the tool call still gets a random UUID task_id.
  5. OpenCode calls SessionID.make(params.task_id), throws on the UUID, and creates no child session.
  6. Retry. Grok says it will omit the field but sends another UUID.

Observed UUIDs from one session:

ff120f9f-a28d-4d29-b691-b3a5f770759b
2e1330f0-c3f3-434a-8fa4-d087bbef323f
6a8440f7-debb-4463-b3f2-a07723d53cd6

A local tool.execute.before plugin that deletes non-ses task_id values makes the same calls start correctly.

Operating System

macOS

Terminal

Kimaki Discord session

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.