When you start working with agents, your work spreads out. Some of it is in a project folder. Some of it is in Git. Some of it is in Drive or OneDrive. Some of the important instructions may live in Codex, Claude Code-style folders, skills, memories, or settings outside the project itself.

Why this matters.

A normal document backup is not enough once you are using agentic tools. The thing you want back after a crash is not only the final file. You want the project history, the instructions, the useful prompts, the skills, the notes, and the context that made the work possible.

The safe answer is not complicated. Put project work in Git. Push important projects to a private GitHub repository or lab repository. Use Drive, OneDrive, iCloud, Dropbox, or another backup tool for ordinary files. Then make a small map of where your agent tools keep their useful state.

Protect three places.

  1. Project work. Code, articles, research packs, training pages, and anything that changes over time should usually live in a project folder with Git history.
  2. Ordinary files. PDFs, meeting packs, exports, images, and documents can be backed up through a normal cloud sync tool, as long as the folder does not contain secrets.
  3. Agent context. Instructions, skills, memories, settings, and worktrees may live outside the project folder. They need a checklist, not guesswork.

Sync is not Git.

Cloud sync is useful, but it is not the same as version control. Drive or OneDrive can help you recover a document. Git helps you recover the history of a project: what changed, when, and why.

Be careful with active Git repositories inside cloud-synced folders. They can work, but sync conflicts, partial uploads, and two machines changing the same files can create mess. If the project matters, Git plus a remote private repository is the safer backbone.

What to back up.

Thing Where it may live Best protection
Project folders Your chosen work folder Git locally, private GitHub remote, regular push
Project instructions AGENTS.md, CLAUDE.md, project docs Commit if public-safe; private backup if sensitive
Codex state ~/.codex/config.toml, ~/.codex/memories/, $CODEX_HOME/worktrees, ~/.codex/agents/, $HOME/.agents/skills Review first; back up useful settings and skills without secrets
Claude Code-style state CLAUDE.md, ~/.claude/CLAUDE.md, .claude/skills/, ~/.claude/skills/, ~/.claude/projects/<project>/memory/, .claude/settings.local.json Review sensitivity; commit project-safe files and privately back up personal state
Ordinary files Documents, images, exports, meeting notes Drive, OneDrive, iCloud, Dropbox, or another managed file backup
Things to exclude Environment files, API keys, tokens, secrets, caches, build output, node_modules, private client data Use .gitignore; store secrets in a password manager or approved secret store

Copy these into your agent.

These prompts are safe starting points. They ask the agent to help you think and map before it touches files, cloud accounts, commits, or remotes.

What to do on the first day.

Do not try to solve every backup problem at once. Pick one current project. Make sure it has a sensible .gitignore. Commit the useful files. Push to a private repository. Then write down where the related agent instructions and skills live.

If you can rebuild that one project on another machine, you are learning the right habit.

Check before you trust.

Open the repository online and check what you pushed. Look for secrets before celebrating. Then check that your cloud sync is actually running and that the files you care about are available from another device or browser.

Official product storage locations can change, so treat this page as a starting checklist. Always check the current docs for your version of Codex, Claude Code, GitHub, Google Drive, and OneDrive before relying on a recovery plan.