Agent History Tether — AI skill for Claude Code
Move, rename, or copy a project folder without losing your AI coding agents' chat history.
How to install Agent History Tether
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open havurgiray/agent-history-tether and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Agent History Tether does
Move, rename, or copy a project folder without losing your AI coding agents' chat history. aht relinks the per-project histories of Claude Code, Codex, Gemini, Cursor, OpenCode, Copilot, and Kimi automatically - with watchers, tray apps, folder badges, and auto-backups on macOS, Linux, and Windows. History is never deleted or overwritten.
Alternatives in AI
- Lovcode — A desktop companion app for AI coding tools 315 ★
- Coffee CLI — A clean AI terminal workspace 180 ★
- OmniCopilot — 1200+ AI models in your GitHub Copilot Chat — free & forever free 58 ★
README
agent-history-tether (`aht`)
**Move a project folder and your AI coding agents forget everything about it.** Claude Code, Codex, Gemini, Cursor and friends each keep per-project conversation history keyed to the folder's *absolute path* — as an encoded directory name, a path hash, or a cwd recorded inside session files. Rename, move, nest or copy the folder and the agent silently starts from zero; the history is still on disk, but orphaned, with no built-in way to reattach it.
**aht fixes that for all of them at once.** One tiny identity marker travels with each folder; one background watcher (plus Claude Code's SessionStart hook as a backstop) notices moves, renames and copies and re-links every agent's history — asking first, by default. It also auto-backs-up all histories, restores them wherever a folder ends up, and badges managed folders. History is never deleted or overwritten.
Supported agents
| backend | agent CLI | storage model | relink | confidence |
|---|---|---|---|---|
claude |
Claude Code | ~/.claude/projects/ |
rename dir | verified (+ SessionStart hook backstop) |
gemini |
Gemini CLI | ~/.gemini/tmp/ |
rename dir | high |
cursor |
Cursor Agent CLI | ~/.cursor/chats/ |
rename dir | best-effort |
opencode |
OpenCode | $XDG_DATA_HOME/opencode/project/ |
rename dir | best-effort |
codex |
OpenAI Codex CLI | ~/.codex/sessions/**/*.jsonl (cwd inside) |
rewrite cwd, backup-first | high (layout confirmed on a real install) |
copilot |
GitHub Copilot CLI | ~/.copilot/history-session-state/** |
rewrite cwd, backup-first | best-effort |
kimi |
Kimi Code | ~/.kimi/sessions/ (+ user-history/.jsonl companion) |
rename dir + companion | verified (mapped from a real install) |
**Why "best-effort" is still safe:** dir-rename backends are *self-verifying* — aht only acts when `key(old_path)` names a director
Related Skills
Chatleak
🧩 VS Code extension: Finds AI coding tool transcripts, prompt histories and local-only agent settings that le
AI Context Bridge
Cross-AI-tool context portability CLI. Switch between Claude Code, Cursor, Copilot, Codex, Windsurf, Cline, an
Lean Agent Skills
⚡ Cut AI coding agent token usage without losing quality — curated Agent Skills for Claude Code, Codex, Antigr
Pbi Edit
Modify any model entity (measures, columns, tables, properties) using plain-English instructions. Supports ren
AI Secret Scout
Zero-dependency heuristic secret scanner & redaction tool for AI coding assistant histories (Claude Code, Anti
Inari
A local-first network of AI agents for the machines you already own: move a running agent between machines, ha
Related Agents
CLI Researcher
Researches how an agent CLI (Codex, Gemini CLI, Kimi CLI, Grok, opencode…) stores its configuration — skills,
Developer Overview
code-container (container) creates isolated Docker environments for AI coding harnesses (Claude Code, OpenCode
Consult Agent
Execute cross-tool AI consultations via Task spawning. Use when agents or workflows need a second opinion from