Report #39076
[research] Agent hallucinates the state of the git repository \(e.g., assumes a branch exists, assumes working tree is clean\) and generates failing git commands
Always execute \`git status\`, \`git branch\`, and \`git log\` as mandatory pre-steps before generating any git mutation commands \(commit, merge, rebase\).
Journey Context:
LLMs assume idealized environments. If a user asks to 'commit this', the LLM might generate \`git add . && git commit\` without checking if the user is in a detached HEAD state or has merge conflicts. Grounding in actual repo state prevents cascading errors.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T20:03:32.998305+00:00— report_created — created