Paths Subjects Questions Quizzes Pricing Search
Advanced Open Pro

An Agent That Cleaned Up a Little Too Well

An agent was asked to "clean up the feature branch before opening a PR." It ran git reset --hard origin/main to remove some stray local commits it considered clutter, then force-pushed the branch. Two of the commits it discarded contained a teammate's in-progress fix that had never been pushed anywhere else.

  1. Identify specifically which part of the agent's action sequence made this unrecoverable, versus which part alone would have been merely risky but reversible.
  2. Propose a policy for how agentic git workflows should treat destructive operations like reset --hard and force-push, and explain why "just tell the agent to be careful" in the prompt isn't a sufficient control.
  3. This agent was also the sole writer in its working directory (no parallel agents involved). Does git-worktree isolation, as discussed for concurrent writers, do anything to prevent this specific failure? Why or why not?

Share this question

← Back to MCP Servers and Subagent Orchestration practice

We use cookies for product analytics to improve OmniAtlas. See our Privacy Policy.