You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature Request] Allow Claude Code to access /resume command for conversation history #6912
Currently, Claude Code cannot use the /resume slash command to access conversation history when users request information about their previous sessions. When a user asks Claude Code to show their last conversations, Claude Code has no programmatic way to access this information. This limitation prevents Claude Code from helping users identify, reference, or analyze their conversation history.
Current Behavior
The /resume command is available to users but not accessible to Claude Code
Claude Code cannot list or view session metadata when requested
Users must manually exit their current session to view conversation history
No programmatic access to session information exists within Claude Code
Desired Behavior
Claude Code should be able to access session history when users request it
Session metadata (timestamps, summaries, message counts) should be retrievable
Users should be able to ask "What were my last 5 conversations?" and get an answer
Claude Code should be able to help users find specific past sessions
User Impact
Users can ask Claude Code directly about their conversation history without leaving the current session
Better continuity and context awareness across multiple sessions
Improved user experience when trying to find or reference past work
Enables Claude Code to be more helpful with session management and analysis
Reduces friction in multi-session workflows
Use Cases
"Show me my recent conversations about React"
"What did we discuss yesterday?"
"List my last 10 sessions"
"Help me find the conversation where we worked on the authentication system"
"What conversations do I have from this week?"
Business Value
This enhancement would make Claude Code more self-aware and helpful, reducing user friction when managing multiple conversations. It aligns with the goal of making Claude Code a more intelligent and context-aware development assistant. This feature would differentiate Claude Code by providing better session management capabilities compared to other AI coding tools.
Based on user request to help analyze conversation history. This feature would enable Claude Code to better assist users in understanding their conversation patterns and finding relevant past sessions.
This feature would also address the related closed issue #1407 about session ID visibility. By enabling programmatic access to session history, Claude Code could:
Thank you for identifying potential duplicates. After reviewing them, this issue is distinct:
Issue #5135 - Requests outputting full conversation history to stdout when resuming.
They want: Historical messages streamed when resuming a specific session
We want: Claude Code to list available sessions and their metadata
Issue #6577 - Requests context data access in statusline hooks.
They want: Token count and memory usage in status line
We want: Session history listing capability for Claude Code
Issue #2979 - Requests session persistence cookies for saving state.
They want: Save session state to markdown files for continuity
We want: Claude Code to access and list existing session metadata
This Issue's Unique Request
Enable Claude Code to execute or equivalent to list session metadata (not resume them, not save them, not stream their content). This would allow users to ask Claude Code "What were my recent conversations?" and get an answer without leaving the current session.
This is a read-only operation on session metadata that doesn't exist in any current issue.
Hey, this is a fantastic suggestion and a really well-thought-out feature request. I've been digging into the local session management myself, and I completely agree that giving Claude programmatic access to its own history would be a game-changer for conversational context.
You've done a great job distinguishing this from the other issues. It's not about resuming or exporting a session's content, but about listing the session metadata—a crucial difference.
While we wait for an official implementation, I did some digging based on the documentation and found a potential workaround that might get us part of the way there. It seems like the conversation history is stored locally.
The documentation on Hooks (hooks.md) mentions the transcript path is something like ~/.claude/projects/PROJECT_HASH/SESSION_ID.jsonl.
This means we could potentially build a custom tool to achieve what you're asking for. For instance, we could create a custom slash command that gives Claude the ability to "see" its own history.
Here's a quick proof-of-concept:
Create a helper script (e.g., ~/.claude/scripts/list_sessions.sh):
#!/bin/bash# This script lists session files and extracts the initial prompt from each.# Find the project directory under ~/.claude/projects for the current CWD
PROJECT_DIR=$(claude doctor --json | jq -r '.projectDir'2>/dev/null)if [ -z"$PROJECT_DIR" ];thenecho"Error: Could not determine project directory."exit 1
fi# List the 10 most recent session files, parse the first line for the initial user prompt.
ls -t "$PROJECT_DIR"/*.jsonl | head -n 10 |whileread -r session_file;do
initial_prompt=$(head -n 1 "$session_file"| jq -r '.message.content[0].text'2>/dev/null | cut -c 1-80)
session_id=$(basename "$session_file" .jsonl)echo"ID: $session_id"echo" - Started with: \"$initial_prompt...\""echo""done
(Make sure to chmod +x ~/.claude/scripts/list_sessions.sh)
Create a personal slash command (in ~/.claude/commands/history.md):
---description: "List the 10 most recent conversation sessions with their starting prompt."allowed-tools: Bash(~/.claude/scripts/list_sessions.sh)---
Here is the recent conversation history for this project:
!~/.claude/scripts/list_sessions.sh
Now, inside any session, you (or Claude) could run /history, and it would inject the list of recent sessions directly into the conversation. From there, you could ask follow-up questions like, "Tell me more about the session where we worked on the authentication system."
This is obviously just a temporary hack, and it relies on undocumented file structures that could change. Having a built-in, first-party tool for this would be far more robust and elegant.
Still, it proves your core concept is sound and technically feasible. Great work on this. Adding my +1 to the official feature request
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.
Activity
github-actions commentedon Aug 31, 2025
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
gonzalomelov commentedon Aug 31, 2025
Additional Context
This feature would also address the related closed issue #1407 about session ID visibility. By enabling programmatic access to session history, Claude Code could:
Technical Note
This aligns with the self-awareness concept from issue #6681 - Claude Code should be able to introspect its own session data without network calls.
gonzalomelov commentedon Aug 31, 2025
Not a Duplicate - Distinct Feature Request
Thank you for identifying potential duplicates. After reviewing them, this issue is distinct:
Issue #5135 - Requests outputting full conversation history to stdout when resuming.
Issue #6577 - Requests context data access in statusline hooks.
Issue #2979 - Requests session persistence cookies for saving state.
This Issue's Unique Request
Enable Claude Code to execute or equivalent to list session metadata (not resume them, not save them, not stream their content). This would allow users to ask Claude Code "What were my recent conversations?" and get an answer without leaving the current session.
This is a read-only operation on session metadata that doesn't exist in any current issue.
Coldaine commentedon Aug 31, 2025
My two cents onthis, it is certainly better handled a different way than just letting them read the metadata after running /resume.
This is best handled by a MCP server or other means.
coygeek commentedon Aug 31, 2025
Hey, this is a fantastic suggestion and a really well-thought-out feature request. I've been digging into the local session management myself, and I completely agree that giving Claude programmatic access to its own history would be a game-changer for conversational context.
You've done a great job distinguishing this from the other issues. It's not about resuming or exporting a session's content, but about listing the session metadata—a crucial difference.
While we wait for an official implementation, I did some digging based on the documentation and found a potential workaround that might get us part of the way there. It seems like the conversation history is stored locally.
The documentation on Hooks (
hooks.md) mentions the transcript path is something like~/.claude/projects/PROJECT_HASH/SESSION_ID.jsonl.This means we could potentially build a custom tool to achieve what you're asking for. For instance, we could create a custom slash command that gives Claude the ability to "see" its own history.
Here's a quick proof-of-concept:
Create a helper script (e.g.,
~/.claude/scripts/list_sessions.sh):(Make sure to
chmod +x ~/.claude/scripts/list_sessions.sh)Create a personal slash command (in
~/.claude/commands/history.md):Now, inside any session, you (or Claude) could run
/history, and it would inject the list of recent sessions directly into the conversation. From there, you could ask follow-up questions like, "Tell me more about the session where we worked on the authentication system."This is obviously just a temporary hack, and it relies on undocumented file structures that could change. Having a built-in, first-party tool for this would be far more robust and elegant.
Still, it proves your core concept is sound and technically feasible. Great work on this. Adding my +1 to the official feature request
github-actions commentedon Dec 5, 2025
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
github-actions commentedon Jan 5, 2026
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
github-actions commentedon Jan 12, 2026
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.