Feature Request: Allow configurable output directory for /export command

Resolved 💬 7 comments Opened Mar 8, 2026 by Hellygin Closed May 20, 2026

Summary

The /export command currently saves conversation files to whatever directory Claude Code was launched from. There is no way to configure a default output location.

Current Behavior

When /export is run, the transcript is saved to the current working directory — whichever directory the user happened to launch Claude Code from. This makes exported files hard to locate consistently.

Problem

Conversations between users and Claude Code in the terminal carry significant value. They document real workflows, decisions, debugging sessions, and accumulated knowledge. Exporting these conversations is therefore an important step for users who want to:

  • Review and reflect on past sessions
  • Extract lessons learned and best practices
  • Build a personal knowledge base from their Claude Code usage
  • Share sessions with teammates for onboarding or review

However, because exported files land in unpredictable locations depending on where Claude Code was started, it becomes difficult to maintain a consistent archive. Users cannot easily collect all exports in one place for later analysis without extra manual steps.

Proposed Solution

Add support for a configurable default export directory, either:

  1. Via /export <path> — allow an optional path argument, e.g. /export ~/Downloads
  2. Via settings — add an exportDirectory field in Claude Code settings (e.g. ~/.claude/settings.json) so users can set a persistent default once

Either approach would allow users to centralize all exported conversations in a single folder, making it practical to build a searchable, analyzable archive of their Claude Code sessions over time.

Why This Matters

A centralized export location transforms /export from a one-off utility into a genuine knowledge management tool. Users who interact with Claude Code daily accumulate a wealth of context and solutions — making that archive easy to maintain significantly increases the long-term value of every session.

Environment

  • macOS
  • Claude Code CLI

View original on GitHub ↗

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