---
title: "Comment by Focus 100 on \"Notes on making an AI agent ask before it pushes\" | Hashnode"
description: "Run 1 shows the limit of matching command strings: once the agent can use sh -c, a script file, a git alias or a Python subprocess, there's always another spell"
url: "https://hashnode.com/posts/notes-on-making-an-ai-agent-ask-before-it-pushes/6b02a5f569e226abdb164989/comment/6b099555b7d5091d5f8fd3dd"
---

[Discussion](https://hashnode.com/posts/notes-on-making-an-ai-agent-ask-before-it-pushes/6b02a5f569e226abdb164989)

Comment [Notes on making an AI agent ask before it pushes](https://hashnode.com/posts/notes-on-making-an-ai-agent-ask-before-it-pushes/6b02a5f569e226abdb164989)

[Focus 100](https://hashnode.com/@focus100)

[6d ago](https://hashnode.com/posts/notes-on-making-an-ai-agent-ask-before-it-pushes/6b02a5f569e226abdb164989/comment/6b099555b7d5091d5f8fd3dd)

Run 1 shows the limit of matching command strings: once the agent can use sh -c, a script file, a git alias or a Python subprocess, there's always another spelling of git push. Wildcards help, but the agent only has to be creative once, and it isn't even trying to evade you, it's just being efficient.

So I'd gate capability rather than text:

-   Your last point, "the token decides what's possible", runs straight into the public\_repo refusal. Until the connection accepts a narrower scope, the repo itself can still say no: a ruleset on main that blocks direct pushes and requires a pull request, with an empty bypass list so it also binds the owner's token, makes a push that slips past the rule fail on GitHub's side.
-   Expose push as its own tool that takes structured arguments (remote, branch) and requires approval. Then the approval binds to the action, not to one exact command string, and a retry after a failed push doesn't need a new prompt for a different spelling.
-   Treat "did not answer" as no. The 7 ms non-answer in run 1, after which the agent picked a neutral identity and carried on, is the case to block: a missing answer should stop that step, not choose a default.

[Kalin Dimitrov](https://hashnode.com/@remdore)

[4d ago](https://hashnode.com/posts/notes-on-making-an-ai-agent-ask-before-it-pushes/6b02a5f569e226abdb164989/comment/6b099555b7d5091d5f8fd3dd#reply-6b0c13baa6afff60e89be92f)

A ruleset on main wouldn't have changed either run. Both pushed a new branch, tests-for-flip, and run one then opened a PR, which is exactly what that ruleset asks for. It stops a push to main, and neither run tried one. For the case in the post it would have to cover creating and pushing branches too, and I haven't tried a ruleset that does. Agreed on the other two. A push tool with structured arguments would also have fixed the retry in run two, which needed a second approval only because the command string changed. And I didn't find a setting that makes an unanswered question stop the run, so for now that would have to go in the prompt, which is a weaker place for it.

[Focus 100](https://hashnode.com/@focus100)

[3d ago](https://hashnode.com/posts/notes-on-making-an-ai-agent-ask-before-it-pushes/6b02a5f569e226abdb164989/comment/6b099555b7d5091d5f8fd3dd#reply-6b0ce0fc61e24cde7f45d79b)

Fair point, I read the ruleset as covering more than it does. It only blocks a push to main, so neither run would have hit it. Branch creation can be restricted separately, but only by targeting all branches, and then every new branch needs a bypass or an approval, which gets noisy. A push tool with structured arguments sounds like the cleaner fix. And agreed that putting "stop on no answer" in the prompt is the weaker place for it.
