🌱 Welcome to Factnetize — honest, well-researched articles on tech, health and AI. Get the weekly →
Agentic AI

When Claude hits its limit mid-task: continue in Hermes from one Git repo

When Claude hits its limit mid-task, Hermes can continue from the same private Git repo. Set up one rules file and a short handoff note, then tell the agent to pull, commit and push.

Two closed laptops on joined desks with one stack of papers between them, for AGENTS.md vs CLAUDE.md

⚡ Key takeaways

  • A usage limit ends a shift, not the work. Put the project in a private Git repo and Hermes can pick up where Claude stopped.
  • You type Git only once, to copy the repo. After that, tell the agent “pull the latest version” when you start and “commit and push” when you stop.
  • Keep a short HANDOFF.md: the goal, what changed, what failed, and the next safe step.
  • The one trap: a secret in the repo. Keep keys outside it.

You are halfway through a task when Claude hits its limit. The work is half done, the reasoning sits in a chat the next tool cannot see, and the reset is hours away. You can wait, or you can let a second agent such as Hermes continue from exactly where Claude stopped. This guide sets that up with one GitHub repo and two small notes, then tests it.

Three things make it work: both agents open the same repo, both read the same rules file, and the agent that stops leaves a note for the one that starts.

What you need

  • A GitHub account, used in the browser, and Git installed on your PC. Git for Windows is the standard installer, and Claude Code’s docs recommend it on native Windows.
  • Claude Code and Hermes, both able to work in a local folder.
  • One small project to practice on, such as a folder of notes or a script.

Step 1: Create a private repo and copy it to your PC

The repo is the shared memory. Both agents read the same files, so nothing has to be pasted from one chat into another.

  1. Open GitHub and click New repository.
  2. Type a name, for example my-project.
  3. Set the visibility to Private.
  4. Choose a .gitignore template, then click Create repository.

GitHub’s guide to creating a repository shows the same form. Next, copy the repo to your PC. This is called cloning, and you do it once.

  1. On your repo’s GitHub page, click the green Code button and copy the HTTPS address.
  2. Open the folder where you keep your projects in File Explorer, type cmd in the address bar and press Enter. A terminal opens in that folder.
  3. Type git clone, a space, paste the address and press Enter. It looks like git clone https://github.com/you/my-project.git.
  4. If a browser window opens, sign in to GitHub and approve. A private repo asks for this the first time.

That sign-in is the only login. You never create a token by hand: Git Credential Manager, which comes with Git for Windows, handles it and stores it in Windows. From then on your agent can pull and push without asking, because it runs Git on your PC and Git reuses that stored sign-in. Never paste a token into a chat with an agent.

Keep every key and password out of the repo. Store them in a folder outside it and list that folder in .gitignore. GitHub’s push protection blocks known secrets, but it is free on public repos and needs a paid license on private ones (GitHub, February 2024), so do not rely on it.

Step 2: Give both agents the same rules

Claude Code looks for CLAUDE.md first, and Hermes prefers AGENTS.md. Keep the rules in one file so both agents follow the same instructions.

  1. Create AGENTS.md in the repo root with your project rules: what the project is, how to run it, what the agent must never do.
  2. Create CLAUDE.md next to it with one line: @AGENTS.md.
  3. Do not create a .hermes.md file, because Hermes would read that instead.

Not sure what to write? Paste this prompt into Claude Code or Hermes, from the repo folder:

Read this repo and write AGENTS.md in the root, under 100 lines: what the project is, how to run and test it, and the rules (never print secrets, start every session with git pull, end with commit and push). Add a short "Handoff" section that says to overwrite HANDOFF.md at the end of every session. Then create CLAUDE.md containing only the line @AGENTS.md. Do not create .hermes.md. Show me both files before you save them.

Why this exact setup, and which file other agents such as Codex and Cursor read, is explained in our guide to AGENTS.md vs CLAUDE.md.

Step 3: Keep a to-do list and a HANDOFF.md

Put two more files in the repo root. They say what to work on.

  • TODO.md: three headings, For me, For the AI and Done. Every agent picks from For the AI and moves finished items to Done with the date.
  • HANDOFF.md: a short note from the agent that stopped to the agent that starts.

A handoff note works best when it is short and specific. This one fits on half a page:

# Handoff
Goal: add a weekly chart to the dashboard page.
Changed: data/weekly.csv now has a "source" column; chart.py reads it.
Tried and failed: plotting both sources on one axis (scales too different).
Blocker: none.
Next safe step: plot each source on its own axis, then run chart.py.
Assumptions that may be wrong: the CSV dates are all UTC.

The “tried and failed” line saves the most time. Without it, the next agent repeats your dead ends.

Step 4: Start and end every session with Git

A handoff only works if the notes are in the repo on GitHub, not only on one PC’s disk. You do not have to type Git yourself. Tell your agent what you want.

  1. Start every session by telling the agent: “Go to my Git repo and pull the latest version.”
  2. Near the end, tell it: “Update HANDOFF.md and TODO.md.”
  3. Then tell it: “Commit the changes with a clear message and push them.”

From the terminal, the same routine is git pull at the start, and git add -A, git commit -m "handoff" and git push at the end. Four Git words cover most of the work:

  • Clone copies the repo to your PC.
  • Pull fetches the latest version.
  • Commit saves your changes with a message.
  • Push sends them to GitHub.

If the limit hits before you update HANDOFF.md, the next agent can still read your recent commits and the changed files. That is why small, frequent commits beat one big commit at the end.

From my own use

I run into usage limits quickly. When Claude stops, I continue with Hermes in the same Git repo, and I find that fast and easy. I rarely type Git commands myself. I ask Hermes to go to my Git repo and pull the latest version, or to commit my changes. I use GitHub in the browser, and Git is installed on my PC because I sometimes use Claude in VS Code.

Step 5: Continue in Hermes when Claude hits its limit

Now the second agent starts from the repo, not from your memory.

  1. Open the repo folder in File Explorer, type cmd in the address bar and press Enter.
  2. Type hermes and press Enter. Hermes starts in the repo folder and loads its AGENTS.md.
  3. Tell Hermes: “Pull the latest version, read HANDOFF.md and TODO.md, then continue with the next safe step.”

If the limit hit before Claude wrote the note, tell Hermes instead: “Read the last commits and the changed files, write HANDOFF.md, then continue.”

When the Claude limit resets, reverse it: Hermes updates HANDOFF.md, pushes, and you start Claude Code with the same instruction.

How I run my own website from one repo

The same pattern works for a long-running project. My website runs from one repo, with a virtual agent in the role of Growth Officer: more clicks, more search traffic, better design, faster pages, and SEO that follows Google and Bing. The role sits in the rules file, so whichever agent opens the repo takes it on.

  • A weekly data job. A Hermes scheduled job saves my Google Search Console and Bing numbers as CSV files in the repo. Why Hermes cron jobs fail and how to fix them covers keeping it alive.
  • A shared to-do list. TODO.md splits For me (accounts, decisions) from For the AI (checks, fixes, proposals). Finished items move to Done with the date.
  • A dashboard. One page shows open and done items next to a chart of clicks from both search engines, with a marker for each date a change went live.

The markers show whether clicks moved after a change. Treat that as a hint, not proof, because small sites have noisy numbers and search engines react slowly.

Check that it works

Run one end-to-end test on a throwaway task.

  1. Put a two-step task in TODO.md, for example “create notes.md, then add a title to it”.
  2. Ask Claude Code to do only the first step, then update HANDOFF.md, commit and push.
  3. Start Hermes in the repo folder and give the pickup instruction from Step 5.
  4. Check that Hermes names the first step as done and completes the second without asking you to explain.

If Hermes asks what the project is, it did not load your rules file. See the first problem below.

Troubleshooting

Hermes ignores AGENTS.md

Check for a .hermes.md, HERMES.md or AGENTS.override.md file in the folder. The first two win over everything else, and the override is used instead of AGENTS.md. Also check that you started Hermes inside the repo folder.

Git says there is a conflict

Two agents edited the same lines. Ask your agent: “Resolve the merge conflict in this file, keep both changes where possible, and show me the result before you commit.” Prevent it by never running two agents on the repo at the same time.

Git asks for a password or the push is refused

The stored sign-in is missing or stale. Open Control Panel → User Accounts → Credential Manager, delete the GitHub entry, then ask your agent to pull once and sign in again in the browser window.

The handoff is out of date

An old HANDOFF.md is worse than none. Ask each agent to overwrite it at the end of a session, not append to it, and to start from the code if the note disagrees with it.

What’s next

If the limit itself is your problem, read how Claude’s five-hour budget works. To let Claude work on GitHub while your laptop is closed, see Claude Code cloud sessions with GitHub. Not sure which tool fits which job? See Hermes vs Claude Code.

This article is part of the Agentic AI series.

John Lock
Written by

John Lock

The Tested Weekly

One email a week with the guides we tested, sources linked. No spam.

Leave a comment

Your email address will not be published. Required fields are marked *

Weekly · No spam

The Tested Weekly

One email a week with the guides we tested, sources linked.