-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
Model: kimi-k2.5-free
Tool Affected: write (file write)
Error: JSON Parse error: Unterminated string
Summary
Large content strings (>4-5KB) with code blocks cause JSON parsing failures when using the write tool.
Reproduction
- Attempt to write file with content containing:
- Markdown with SQL code blocks (triple backticks)
- Unicode box-drawing characters (│ ├ └)
- Length > 4000 characters
- JSON parser fails with "Error message: JSON Parse error: Unterminated string]"
Suspected Causes
- String length exceeding parser buffer
- Improper escaping of nested quotes or backticks
- Multibyte character handling issues
Workaround
Split content into smaller chunks (<3KB each) or use edit tool for incremental writes.
Environment - Platform: darwin/macOS
- Working with: Technical documentation, SQL schemas, code examples
Plugins
No response
OpenCode version
1.1.40
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
macOS Tahoe Version 26.2
Terminal
Ghostty
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working