Skip to content

[Bug] Question tool fails to parse JSON with French accented characters (UTF-8) #7484

@fdematos

Description

@fdematos

Description

The question tool (introduced in v1.1.7) fails to parse JSON parameters when the question text or option labels contain French accented characters (é, è, à, ê, ù, etc.).

Expected Behavior

The interactive question dialog should display with the French text properly rendered, allowing the user to select an option.

Actual Behavior

The tool returns a JSON parsing error:

Error: The question tool was called with invalid arguments: [
  {
    "expected": "array",
    "code": "invalid_type",
    "path": ["questions"],
    "message": "Invalid input: expected array, received string"
  }
]

The JSON array with accented characters appears to be incorrectly parsed as a string.

Additional Context

Plugins

No response

OpenCode version

1.1.8

Steps to reproduce

Steps to Reproduce

  1. Have the agent call the question tool with French text containing accents:
{
  "questions": [{
    "question": "Que souhaitez-vous que je prépare pour cette non-conformité ?",
    "header": "Action",
    "options": [
      {"label": "Réponse CAPA uniquement", "description": "Juste le texte CAPA à insérer"},
      {"label": "Créer dossier 6.1.2/", "description": "Créer un dossier avec documentation"}
    ],
    "multiple": false
  }]
}

Screenshot and/or share link

No response

Operating System

macOS (darwin)

Terminal

Standard macOS terminal

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions