#Commands like `git diff` block the agent from doing anything. Is there a rule to universally block?

3 messages · Page 1 of 1 (latest)

frail needle
#

Block these type of commands *

boreal elkBOT
#

Hi @frail needle. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Warp currently allows you to control agent autonomy and block or allow specific commands using the command denylist and allowlist features. You can add regular expressions to the denylist to require explicit approval before the agent runs certain commands. For example, to block commands like git diff, git log, or any command that typically triggers a pager, you can add patterns such as:

git diff(\s.*)?
git log(\s.*)?
less(\s.*)?
man(\s.*)?

Add these patterns in Settings > AI > Agents > Command denylist. Any command matching these patterns will always require your confirmation before execution, effectively blocking the agent from running them autonomously. The denylist takes precedence over other settings, so even if the agent is set to full autonomy, it will still prompt for approval on denylisted commands Agent Permissions.

There is currently no universal "block all pager commands" toggle, but you can manually expand the denylist with additional patterns as needed. If you want to prevent the agent from getting stuck in pagers, you might also consider requesting or upvoting the feature to automatically avoid pager output in AI agent commands, as discussed in a related feature request Add setting to automatically prevent pager output in AI agent commands.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: