{
  "id": 13849616,
  "title": "Bash(git push *) in a Claude Code subagent's disallowedTools took away all of Bash in 10 of 10 launches, not just git push",
  "url": "https://urgent.news/2026/10/12/bash-git-push-in-a-claude-code-subagents-disallowedtools-took-away",
  "topic": "ai",
  "section": "AI",
  "published": "2026-10-12T02:17:00.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/rulestack/bashgit-push-in-a-claude-code-subagents-disallowedtools-took-away-all-of-bash-in-10-of-10-4ihj"
  },
  "original_language": "en",
  "account": "In a series of 10 Claude Code 2.1.289 subagent launches, the disallowedTools parameter Bash(git push *) was found to completely disable Bash, affecting not just git push, but also git status and echo. While the documented workaround using a Bash(git push *) deny rule in settings successfully prevented git push 3 out of 3 times, the subagent sometimes invoked git -C path push origin main, bypassing the restriction. To address this issue, a custom subagent was created that could run shell commands but was expressly forbidden from pushing code. The issue was investigated by testing a lab with two throwaway git repositories containing various subagent configurations and 39 claude -p runs. The findings showed that the disallowedTools specifier in subagents effectively removes the entire tool, unlike in the main conversation or settings where it would only block specific commands.",
  "summary": "On Claude Code 2.1.289, a subagent whose disallowedTools said Bash(git push *) started without the Bash tool in 10 of 10 launches, so git status and echo failed along with the push, just as the docs warn. The documented alternative, a Bash(git push *) deny rule in settings, kept Bash and stopped git push origin main 3 of 3 times, but when the subagent was only handed the repository path it typed…",
  "key_points": [
    "Git push not the only affected command; git status and echo also blocked",
    "Custom subagent created to run shell commands while preventing code pushing"
  ],
  "editors_take": "The overly broad application of the disallowedTools parameter turns specific command restrictions into total tool bans, forcing developers to build custom subagents to maintain essential shell functionality.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}