From 79bc83cca083ef6c04b27439f1585f6d7c5273ce Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 19 Oct 2026 20:00:09 +0000 Subject: [PATCH] Warn resumed sessions about stale and shallow checkouts in AGENTS.md Three sessions resumed on December 2025 branches today and judged repository state from that checkout; at least two made false "no shared history" claims because git merge-base misses shared ancestry in a shallow clone. The note points agents to a fetched origin/main and to GitHub's compare API for ancestry, including the already-landed check. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01SHCrxvZuVwzVNC7SDC9TAj --- AGENTS.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 0899d8381..8c31d1553 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -25,6 +25,13 @@ requests. Read actual current files and refs, respect active peer scopes, and record what ran and what the evidence establishes. Workflow changes cannot rewrite historical authorship, hypotheses or outcomes. +A resumed session can start on an old branch or in a shallow clone. Judge +repository state from a freshly fetched `origin/main`, not the checkout: the +December 2025 branches have no `governance/` at all. When +`git rev-parse --is-shallow-repository` prints `true`, `git merge-base` and +`--is-ancestor` can miss shared history, so take ancestry, including for the +already-landed check, from GitHub's compare API (`merge_base_commit`). + ## Choose the right entry - [Public research home](docs/site/index.html): approachable mathematics and