Feature Request: Configurable Session File Directory

Resolved 💬 3 comments Opened Sep 6, 2025 by hswee92 Closed Jan 5, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Summary

Allow users to configure where Claude Code saves session files (.start files) to keep the .claude configuration directory organized.

Current Behavior

  • Session files (session_*.start) are saved directly in the .claude directory
  • Over time, this creates clutter with many session files mixed with configuration files
  • No apparent configuration option to change this location

Proposed Solution

Requested Feature

Add a configuration option to specify a subdirectory for session files, such as:

{
  "sessionDirectory": "sessions"
}

This would save session files to .claude/sessions/ instead of .claude/ root.

Benefits

  • Organization: Keeps configuration files separate from session data
  • Maintenance: Easier to clean up old sessions without affecting config
  • Scalability: Better organization for users with many sessions
  • Consistency: Follows common patterns used by other tools (logs/, backups/, etc.)

Workaround

Currently users must manually organize session files or periodically clean them up.

Environment

  • OS: Windows 11
  • Claude Code version: [Please add your version]

Additional Context

The .claude directory already uses subdirectories for organization (logs/, backups/, agents/, etc.), so extending this pattern to session files would be consistent with the existing structure.

Alternative Solutions

_No response_

Priority

Critical - Blocking my work

Feature Category

CLI commands and flags

Use Case Example

_No response_

Additional Context

_No response_

View original on GitHub ↗

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