← ClaudeAtlas

resume-previous-chatlisted

Use when the user says "continue the previous chat", "continue where we left off", "recover the context", "my chat expired", "I lost that conversation", "reuse that skill from last time", or opens a fresh chat to keep working on something started in a chat that is now gone. Recovers the previous Claude Code or Codex chat for the current project folder from their on-disk transcripts so work picks up where it stopped.
vedant-aggarwal/resume-previous-chat · ★ 0 · AI & Automation · score 72
Install: claude install-skill vedant-aggarwal/resume-previous-chat
# Resume Previous Chat ## Overview Chats end: a context window fills up, a session crashes, a web chat expires, or a message gets lost. Claude Code and Codex both save every chat to disk, so the previous chat's context can be recovered, even when the lost chat ran in the other tool. This skill loads it and continues the work. **Core rule:** the chat to recover is the most recent one **in the project folder you are in now**, from either tool. If the user was working in a different folder, they will say so. Then target that folder or chat explicitly. ## Where the chats are stored - **Claude Code:** `~/.claude/projects/<encoded-cwd>/<session-id>.jsonl` (`$CLAUDE_CONFIG_DIR` overrides `~/.claude`). `<encoded-cwd>` is the absolute folder path with every non-alphanumeric character replaced by `-`: `C:\Users\me\my-app` → `C--Users-me-my-app`, `/home/me/my-app` → `-home-me-my-app`. - **Codex:** `~/.codex/sessions/YYYY/MM/DD/rollout-<time>-<thread-id>.jsonl` (`$CODEX_HOME` overrides `~/.codex`). The first record is `session_meta`, whose `payload.cwd` is the chat's folder. Conversation text is in `response_item` records with `payload.type == "message"`. User messages that start with `<` (environment blocks, automation prompts) or `# AGENTS.md instructions` are injected context, not the user. - **The live chat** (the one running this skill) is excluded by id: `CLAUDE_CODE_SESSION_ID` in Claude Code, `CODEX_THREAD_ID` or `CODEX_SESSION_ID` in Codex. If none is set, a chat written in