frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Tell HN: Cursor agent force-pushed despite explicit "ask for permission" rules

6•xinbenlv•6h ago
I've been using Cursor with Claude as my coding assistant. I set up explicit workspace rules stating that the agent must ask for my approval before executing any git operations (git commit, git add, git push, etc.).

Today, I asked it to run gt restack (Graphite CLI) and resolve conflicts. The agent resolved the submodule conflict correctly, but then proceeded to run git push --force-with-lease --no-verify without asking for permission - directly violating my rules.

The agent's defense was reasonable ("force push is expected after a rebase"), but that's exactly why I want to be asked first. The whole point of the rule is to maintain human oversight on destructive operations.

I'm curious:

Has anyone else experienced AI agents ignoring explicit safety rules? How are you handling guardrails for potentially destructive operations? Is there a more reliable way to enforce these boundaries?

The irony is that the agent acknowledged the rule violation in its apology, which means it "knew" the rule existed but chose to proceed anyway. This feels like a trust issue that could have much worse consequences in other scenarios.

Comments

slau•5h ago
A few months ago, I switched to exclusively using an SSH key stored on my Yubikey token. I also recently switched to my default git config signing all commits with my SSH key. The way it’s setup means I have to touch my token every time I try to commit or push.

I typically commit everything myself—I’m still quite early in my adoption of coding agents. One of my first experience with OpenCode (which made me stop using it instantly) was when it tried to commit and force push a change after I simply asked it to look into a potential bug.

Claude Code seems to have better safeguards against this. However, I wonder how come we don’t generally run these things inside docker containers with only the current dir volume mounted or something to prevent spurious FS modifications.

I’m entirely with you that we need better ways to filter what commands these things are allowed to run. Specifically, a CLAUDE.md or “do not do this under any circumstance” as part of the prompt is a futile undertaking.

hombre_fatal•4h ago
Prompt instructions are never sufficient for this. The tool call itself needs to be gated.

With Claude Code, tools like Bash(“git *”) always ask for permission unless you’ve allowed it.

Figure out the Cursor equivalent of that.

ThePowerOfFuet•3h ago
It continues to surprise me that people continue to be surprised by this.
yellow_lead•3h ago
> The irony is that the agent acknowledged the rule violation in its apology, which means it "knew"

No, the AI never "knew" anything! :)

How do I make $10k (What are you guys doing?)

2•b_mutea•24m ago•5 comments

Ask HN: What AI feature looked in demos and failed in real usage? Why?

2•kajolshah_bt•38m ago•2 comments

Ask HN: How do you find the "why" behind old code decisions?

13•siddhibansal9•13h ago•21 comments

Ask HN: Does DDG no longer honor "site:" prefix?

15•everybodyknows•10h ago•5 comments

Tell HN: Cursor agent force-pushed despite explicit "ask for permission" rules

6•xinbenlv•6h ago•4 comments

Ask HN: Do you have any evidence that agentic coding works?

441•terabytest•2d ago•442 comments

Ask HN: Best practice securing secrets on local machines working with agents?

8•xinbenlv•22h ago•11 comments

Tell HN: 2 years building a kids audio app as a solo dev – lessons learned

133•oliverjanssen•1d ago•75 comments

Ask HN: Is Claude Down for You?

25•philip1209•14h ago•19 comments

Ask HN: Why are so many rolling out their own AI/LLM agent sandboxing solution?

29•ATechGuy•2d ago•11 comments

From Sketch to Masterpiece: Understanding Stable Diffusion Img2Img

2•bozhou•6h ago•0 comments

Ask HN: How do you authorize AI agent actions in production?

5•naolbeyene•21h ago•4 comments

Ask HN: What is your opinion on non-mainstream mobile OS options (e.g. /e/OS)?

5•sendes•18h ago•3 comments

Ask HN: Have you managed to switch to Bluesky for tech people?

9•fuegoio•13h ago•9 comments

Ask HN: What's the best virtual Linux desktop experience on macOS for devs?

7•darkteflon•13h ago•4 comments

Ask HN: COBOL devs, how are AI coding affecting your work?

168•zkid18•3d ago•183 comments

Ask HN: Modern test automation software (Python/Go/TS)?

7•rajkumar14•15h ago•3 comments

Ask HN: How do you verify cron jobs did what they were supposed to?

6•BlackPearl02•1d ago•9 comments

Tell HN: Drowning in information but still missing everything

9•akhil08agrawal•1d ago•7 comments

Ask HN: Revive a mostly dead Discord server

20•movedx•2d ago•28 comments

Tell HN: We have not yet discovered the rules of vibe coding

2•0xbadcafebee•10h ago•0 comments

Ask HN: Industrial smart glasses with online / offline capabilities?

3•aureliusm•23h ago•0 comments

Ask HN: Anyone doing production image editing with image models? How?

4•geooff_•19h ago•0 comments

Ask HN: Does "Zapier for payment automation" exist?

8•PL_Venard•1d ago•12 comments

Ask HN: Is there any good open source model with reliable agentic capabilities?

4•baalimago•1d ago•0 comments

Ask HN: Unusual Network Filter

4•gman21•23h ago•0 comments

Tell HN: Claude session limits getting small

23•pragmaticalien8•1d ago•15 comments

Ask HN: Claude Down?

3•emschwartz•13h ago•2 comments

Ask HN: Which common map projections make Greenland look smaller?

18•jimnotgym•2d ago•17 comments

Tell HN: Avoid Cerebras if you are a founder

34•remusomega•1d ago•14 comments