Skip to content

Long session titles produce unsavable export filenames #49142

Closed as not planned
Closed as not planned

Description

@sdivyanshu90

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

  1. Create a session whose title contains 300 ASCII letters.
  2. Generate its session-export filename.
  3. Observe that the result is 305 bytes long.
  4. 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

Activity

  1. sdivyanshu90 commented on Sep 19, 2026

    @sdivyanshu90
    ContributorAuthor

    Could you please review this issue?

  2. thdxr commented on Oct 11, 2026

    @thdxr
    Member

    Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions