Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: auto-resume Claude Code sessions per Git branch (github.com/paterlinimatias)
1 point by paterlinimatias 6 months ago | hide | past | favorite | 1 comment
I kept losing conversation context when switching branches in Claude Code — every `claude` invocation starts a fresh session.

cc is a single bash script that fixes this. It scans ~/.claude/projects/ for your session history, finds the most recent session that started on the current branch, and runs `claude --resume <id>`.

A small embedded Python snippet handles the JSONL parsing (bash can't reliably parse JSON). No npm dependencies at runtime — just bash and Python stdlib.

https://github.com/paterlinimatias/claude-cc



cc is generally used by the C compiler on the box. I'd suggest renaming it instead of overriding it or provide some suggestions.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: