Skip to content

Question tool error, ' stops/hangs execution completely in headless mode #10012

@rwese

Description

@rwese

Description

When I run opencode in a a loop it sometimes causes the Agent to ask questions,

question_tool_error.json

i use opencode run --agent ... , so questions are useless too, causing my loop/script to get stuck.

→ Asked 2 questions
Error: The question tool was called with invalid arguments: [
  {
    "origin": "string",
    "code": "too_big",
    "maximum": 30,
    "inclusive": true,
    "path": [
      "questions",
      0,
      "options",
      0,
      "label"
    ],
    "message": "Too big: expected string to have <=30 characters"
  },
  {
    "origin": "string",
    "code": "too_big",
    "maximum": 30,
    "inclusive": true,
    "path": [
      "questions",
      1,
      "options",
      0,
      "label"
    ],
    "message": "Too big: expected string to have <=30 characters"
  }
].
Please rewrite the input so it satisfies the expected schema
Image

Plugins

No response

OpenCode version

OpenCode 1.1.31

Steps to reproduce

  1. I was unable to force the error, i hope the exported session helps.

attempt, here it worked fine everytime:

we are debugging a opencode issue, it fails to propperly handle/ask very long choice question. 
write a 2 paragraph stories and ask which is better to verify this issue.
ask using the question too.
Image

Screenshot and/or share link

https://opncd.ai/share/uF0512WZ

Operating System

MacOS Tahoe 26

Terminal

Ghostty, but was running in a shellscript loop

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions