-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Closed
Labels
opentuiThis relates to changes in v1.0, now that opencode uses opentuiThis relates to changes in v1.0, now that opencode uses opentuiwindows
Description
Bug Description
OpenCode throws a ZodError after sending a message, but recovers after toggling fullscreen mode.
Error Message
schema validation failure
ZodError: {
"origin": "string",
"code": "invalid_format",
"format": "starts_with",
"prefix": "prt",
"path": "id",
"message": "Invalid string: must start with \"prt\""
}
Stack trace:
result5at/$bunfs/root/src/cli/cmd/tui/worker.js:103962:20createUserMessageat/$bunfs/root/src/cli/cmd/tui/worker.js:189832:35
Steps to Reproduce
- Start OpenCode in terminal
- Send any message
- Error appears immediately
- Toggle fullscreen (or resize terminal)
- Error clears and app works normally
Environment
- OpenCode version: 1.2.27
- Platform: Windows WSL2
- Distro: Ubuntu 24.04.4 LTS
- Kernel: 5.15.167.4-microsoft-standard-WSL2
Additional Context
The error appears to be related to an ID validation schema that requires id.startsWith("prt"). This might be related to:
- Config file ID format
- Supermemory storage record IDs
- Session/agent ID generation
- Conversation/message ID handling
Workaround
- Toggling fullscreen mode clears the error
- Resizing terminal window also helps
Suggested Fix
Either:
- Make the
prtprefix validation more lenient or provide fallback - Ensure all generated IDs include the required prefix
- Add better error handling/recovery for this validation failure
- Auto-retry or regenerate ID when validation fails
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
opentuiThis relates to changes in v1.0, now that opencode uses opentuiThis relates to changes in v1.0, now that opencode uses opentuiwindows