-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
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
- The error suggests the JSON payload is being corrupted during transmission or parsing
- This may be related to UTF-8 encoding of the parameters before validation
- Similar issues with non-ASCII characters were reported in WebUI fails with non-ASCII directory names (TypeError: String contains non ISO-8859-1 code point) #6921 (WebUI with non-ASCII directory names)
- Potentially related to opentui: fatal: answer.join is not a function. (In 'answer.join(", ")', 'answer.join' is undefined) #7392 (another question tool bug)
Plugins
No response
OpenCode version
1.1.8
Steps to reproduce
Steps to Reproduce
- Have the agent call the
questiontool 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working