anomalyco / anomalyco/opencode

Session exports use Windows-reserved filenames

Open
#49,137 1 comment 0 reactions 1 assignee View on GitHub

@Hona 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 are sanitized for punctuation but not for Windows reserved device basenames. A session titled CON, PRN, AUX, NUL, COM1 through COM9, or LPT1 through LPT9 receives a download name such as con.json, which Windows cannot represent reliably. Reserved sanitized basenames should receive a safe suffix while ordinary export names remain unchanged.

Plugins

None

OpenCode version

1.18.30

Steps to reproduce
  1. Create or rename a session to CON.
  2. Export the session from the app.
  3. Observe that the suggested download filename is con.json.
  4. Repeat with PRN, AUX, NUL, COM1, or LPT9.

Expected: the app suggests a portable filename such as con-session.json.

Actual: it suggests a Windows-reserved device filename.

Screenshot and/or share link

Not applicable; the filename helper reproduces the issue directly.

Operating System

Windows

Terminal

All

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.