anomalyco / anomalyco/opencode
Long session titles produce unsavable export filenames
@rekram1-node is already working on this.
Since Sep 15, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
Session export filenames have no length limit after title sanitization. A 300-character ASCII title produces a 305-byte filename including .json, exceeding the common 255-byte filename-component limit and causing saves to fail with ENAMETOOLONG on affected filesystems. The sanitized basename should be capped while preserving the .json extension.
Plugins
None
OpenCode version
1.18.30
Steps to reproduce
- Create a session whose title contains 300 ASCII letters.
- Generate its session-export filename.
- Observe that the result is 305 bytes long.
- Try to create a file with that name on a filesystem with a 255-byte component limit.
Expected: the suggested filename fits within the filesystem limit and retains .json.
Actual: saving fails because the generated filename is too long.
Screenshot and/or share link
Not applicable; the filename length and filesystem error reproduce the issue directly.
Operating System
All
Terminal
All
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.