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
- Blender AI MCP Addon — AI assistant and MCP server for Blender: visual chat, scene tools, multi-agent workflows 531 ★
- Wechat Acp — Bridge WeChat chat messages to any ACP-compatible AI agent (Claude, Codex, Copilot, Qwen, Gemini, OpenCode and 488 ★
- Lovcode — A desktop companion app for AI coding tools 315 ★
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
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
OmniCopilot
1200+ AI models in your GitHub Copilot Chat — free & forever free. VS Code extension powered by OmniRoute: 340
AI Secret Scout
Zero-dependency heuristic secret scanner & redaction tool for AI coding assistant histories (Claude Code, Anti
Lupin
Run Claude Code on any LLM provider without losing your setup, local-first proxy with verified profiles, OAuth
Related Agents
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
Agent Of Empires
Claude Code, OpenCode, Mistral Vibe, Codex CLI, Gemini CLI Coding Agent Terminal Session manager via tmux and