[BUG] `/export` command fails with absolute paths on Windows

Resolved 💬 3 comments Opened Mar 11, 2026 by cwheo Closed Mar 14, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Bug: /export command fails with absolute paths on Windows

Environment: Windows (MSYS_NT), Claude Code CLI

Steps to reproduce:

  1. Working directory: D:\Work_Claude\2026\03\CodeZap\CodeZap\CodeZap
  2. Run: /export D:\Work_Claude\2026\03\CodeZap\AiCollabDocs\2026\03\file.txt

Expected: File exported to the absolute path specified.

Actual: Error - path is concatenated as:
D:\Work_Claude\2026\03\CodeZap\CodeZap\CodeZap\D:\Work_Claude\2026\03\CodeZap\AiCollabDocs\2026\03\file.txt

The /export command prepends the current working directory to the given path
even when an absolute path (with drive letter) is provided.

Forward slashes (D:/...) also fail the same way.

What Should Happen?

/export D:\Work_Claude\2026\03\CodeZap\AiCollabDocs\2026\03\file.txt

Error Messages/Logs

❯ /export D:\Work_Claude\2026\03\CodeZap\AiCollabDocs\2026\03\20260311_1505_CodeZap_Chat.txt
  ⎿  Failed to export conversation: ENOENT: no such file or directory, open 'D:\Work_Claude\2026\03\CodeZap\CodeZap\Code
     Zap\D:\Work_Claude\2026\03\CodeZap\AiCollabDocs\2026\03\20260311_1505_CodeZap_Chat.txt'

Steps to Reproduce

  1. Try issuing the following command in Claude Code.

/export D:\a.txt

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.72

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗