Approach A: CLAUDE.md behavioral instruction (mid-session)
A behavioral instruction in ~/.claude/CLAUDE.md makes Claude call /rename automatically after 2-3 exchanges. No tooling required, works across all IDEs and terminals.
markdown
# Session Naming (auto-rename)
## Expected behavior
1. **Early rename**: Once the session's main subject is clear (after 2-3 exchanges),
run `/rename` with a short, descriptive title (max 50 chars)
2. **End-of-session update**: If scope shifted significantly, propose a re-rename before closing
## Title format
`[action] [subject]`. Examples:
- "fix whitepaper PDF build"
- "add auth middleware + tests"
- "refactor hook system"
- "update CC releases v2.2.0"
## Rules
- Max 50 characters, no "Session:" prefix, no date
- Action verb first (fix, add, refactor, update, research, debug...)
- Multi-topic: dominant subject only, not an exhaustive list
- Do NOT ask for confirmation on early rename (just do it)This works well during active sessions but depends on Claude following the instruction consistently.