[FEATURE] Add /copy-location command to capture session + working directory for easy resuming
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
When working with Claude Code across multiple projects and directories, it's difficult to "bookmark" a specific
conversation thread for later resuming. While /rename and claude --resume work great for session management, they
don't capture the working directory context.
Current workflow:
- cd /path/to/project
- claude --resume my-session
If I switch terminals or directories, I need to manually remember both the directory and session name.
Proposed Solution
Add a /copy-location command that outputs (and optionally copies to clipboard) a runnable command:
> /copy-location
Copied to clipboard: cd /Users/me/project-a && claude --resume auth-refactor
Alternative Solutions
Alternative/additional syntax:
> /copy-location --format url
Copied: claude-code://resume/auth-refactor?cwd=/Users/me/project-a
Benefits
- Shareable session links for team collaboration
- Easy bookmarking in task managers or notes
- Reduces friction when context-switching across multiple projects
- Natural extension of existing /resume functionality
Workarounds (current)
Manually constructing commands like:
cd /path/to/project && claude --resume session-name
But this requires remembering both pieces of information and manually typing them out.
Priority
High - Significant impact on productivity
Feature Category
CLI commands and flags
Use Case Example
I often have multiple Claude Code sessions running in different project directories:
- /Users/me/project-a → session "auth-refactor"
- /Users/me/project-b → session "bug-fix-123"
I'd like to paste a "location" into my notes, Slack, or task manager that I can later copy and paste back into a
terminal to resume exactly where I left off.
Additional Context
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗