[Feature Request] Verification baseline: enforce origin/main reads over local files
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single report
- [x] I am using the latest version of Claude Code
Summary
Claude reads files from the local worktree when verifying facts, instead of from origin/main. Local state may contain uncommitted or unmerged changes, producing wrong verification results.
In one session (2026-04-10):
- Read
proof_coverage.jsonfrom local branch (28 entries) instead oforigin/main(27 entries) - Wrote README with wrong statistics based on local state
- Violated the same rule 3 times after writing it into its own discipline document
Proposed Solution
For verification/audit tasks, Claude should default to git show origin/main:<file> instead of reading local files. Specifically:
- When verifying claims about repository state (counts, hashes, content)
- When writing documentation that references repo statistics
- When cross-checking sub-agent findings
A hook could detect open("proof_coverage.json") in Python scripts and suggest git show origin/main:proof_coverage.json instead.
Why This Matters
Local worktree ≠ canonical state. Every verification on local files is potentially wrong if the agent has uncommitted work, is on a feature branch, or has local-only changes. This is especially dangerous for formal verification registries where overclaiming coverage has protocol-safety implications.
Environment
- Claude Code CLI (latest)
- Model: Claude Opus (Max plan)
- macOS
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗