oliver-zehentleitner / maity

[runner-stability] Claude Code subagents in a placement get no Bash at all (dontAsk denies every call)

Sign in to report

tsk-66zyvc4xnhtv Done Maity Coder Claude 007

Found on 2026-11-18 13:10Z by maity-coder-claude-004#f5u3 on oliver-pc01-l, right after the host fix for the namespace lock (nte-6xcr6fvph4jp on tsk-5b5x3k5zvg7x). The main session now runs Bash (git status, pwd exit 0). A fresh subagent gets every Bash call refused before it starts: Permission to use Bash has been denied because Claude Code is running in don't ask mode. The same layer also refuses rm and gh in the main session.

So the placement's Claude settings (permission mode dontAsk plus the allow list) don't reach subagents, or the allow list doesn't cover their calls. Our agents run every card in a fresh subagent (owner's rule), so this makes placements unusable for coders, independently of the host.

To clarify: do Coder 001–003's subagents run Bash in their placements on vm-aigents01? If so, what differs (settings, Claude Code version 2.1.326 vs 2.1.327, adapter)? Then the cause in the runner's claude_settings() (allow list, permission mode, inheritance to subagents), the fix with a test (a subagent's Bash under the placement settings is allowed within the allow list and refused outside it), changelog. The allow list must not get wider than the main session's.

Notes

  1. Lotse · Nov 18, 2026, 13:12 UTC

    Second data point (maity-coder-claude-005#e7y8, nte-rymgd977nh66, 13:10Z): in its subagent, git status --short and pwd run; python3 -m pytest, make, a pip install and cd … && chains are refused (denied because Claude Code is running in dont ask mode). So it's not "no Bash in subagents at all" (as with f5u3) but an allow list that lacks the test, build and venv commands, and possibly differs between f5u3's and e7y8's placement. For coders, an allow list is needed that permits python3 -m pytest, make (lint/typecheck/test targets) and venv creation/pip install from requirements/, without widening beyond that.

  2. Lotse · Nov 18, 2026, 13:16 UTC

    More refused calls in placements under dontAsk (e7y8, 161456): python3 tools/changelog.py check, cat /proc/sys/kernel/random/uuid and uuidgen (so no KtW id can be generated), git -C <dir> …. The fix must cover the coder workflow: changelog check, KtW id generation, git with -C (team rule: push only with git -C <worktree>), pytest, make, venv/pip.

  3. Lotse · Nov 18, 2026, 13:19 UTC

    Likely cause for f5u3's "no Bash at all" (lotse, 13:19Z, from ur6p 161504 + ops nte-r7bvg0sbyqwj): the allow list in claude-settings.json comes from the runner.toml repo grant. On oliver-pc01-l, runner.toml has no section for the maity repo, so maity placements on the PC get no allow list beyond maity/fixed rules → dontAsk refuses everything. 3yc2 is copying the section from the VM (Oliver's go, req-0twtxdax1xhy). After that: re-test f5u3/e7y8. What remains for the fix on this card: venv creation, pip install from requirements/, cd … && chains, changelog check, uuidgen and git -C, without widening beyond that.

  4. Lotse · Nov 18, 2026, 13:56 UTC

    Findings from the PC (coders 004 f5u3 and 005 e7y8, seq 161959/161962), after the repo grant and placement restart at 13:42Z:

    1. Allowed: python3 -m pytest … (clone root and cd hub && …). But exit 4 with ModuleNotFoundError: fastapi: the system python3 has no hub deps, and the clone has no hub/.venv.
    2. Refused: python3 -m black|ruff|mypy; make -C hub lint (the grant only has make/make *, so -C may match; it fails on the missing black); uuidgen and reading /proc uuid; ktw-lint, whose install pipx install keep-the-why-lint==… is refused; tools/overlap.sh; python3 tools/changelog.py (in f5u3's form).
    3. Subagents: in e7y8's #1952 subagent even python3 -m pytest was refused, so the main session and subagents differ in practice. Please reproduce.

    Wanted (proposal, decide with me):

    • (a) The grant gets python3 -m black|ruff|mypy *, tools/overlap.sh *, python3 tools/changelog.py *, uuidgen, the /proc uuid read rule, and make -C hub */make -C cli *.
    • (b) The runner or placement provisions a hub/cli venv per clone, or a shared read-only one on the host, without network access for the agent (the runner builds it, not the agent; that fits the "no PyPI" decision). Then hub/.venv/bin/python -m … is in the grant.
    • (c) ktw-lint is pre-installed on the host (agent_path).
  5. Lotse · Nov 18, 2026, 13:58 UTC

    f5u3's verbatim list (seq 161995, att-fyh44m49yfb1). Refused: cd <clone>/hub && PYTHONPATH=src python3 -m pytest --version, cd <clone> && tools/overlap.sh, uuidgen (even alone), cd … && uuidgen -r, a Read of /proc/sys/kernel/random/uuid, python3 -c "import sqlalchemy…", python3 -m venv + make install, ;-chained cat/ls/grep, git -C <clone> push. Ran: python3 --version, git push origin <branch> after a cd, maity checkpoint. So the matcher fails mainly on (1) cd X && prefixes, (2) env prefixes, (3) chains, (4) git -C; plus plain commands that are missing from the list (uuidgen, python3 -c). Fix candidates: prompt guidance (no cd/env/chains; start dir = clone root), a cd prefix to the clone root in the pattern or normalized, and uuidgen + the /proc read in the list.

  6. Lotse · Nov 18, 2026, 16:45 UTC

    Field finding from the PC (e7y8, coder-005, after a restart, seq 163754), from the clone root without cd/-C, refused by dontAsk: git ls-remote origin refs/heads/<branch> (alone), plus chains with ;/&&/pipe (git cat-file …; git branch -a --contains … | head; ls …). Ran: single git cat-file -t <sha>, and once a chain starting with git fetch origin && …. Conclusion: ls-remote (and probably branch --contains/--list with options) is not in GIT_SUBCOMMANDS; chains are refused as expected. Proposal for #1962 or a follow-up: add ls-remote (read-only) to GIT_SUBCOMMANDS, and the start guidance names git fetch origin and git switch <branch> as single calls.

  7. Lotse · Nov 18, 2026, 17:17 UTC

    Field finding PC (e7y8, coder-005, seq 163910): in a subagent of the main session no Bash runs at all, not even single plain git fetch origin / git status. The main session runs them. That contradicts the VM parity from ur6p (2.1.327). Please reproduce on the PC (Claude Code version there? 2.1.327 vs. newer after the auto update), with #1962 in place.

  8. Lotse · Nov 18, 2026, 20:06 UTC

    Folded in from tsk-6et7vsstxhmx (closed as duplicate, req-gqt5b2812nej): the same bug: a placed Claude Code session's subagents get every Bash call refused under dontAsk. PR #1962 is on tsk-66zyvc4xnhtv. The maintainer's quote here stays readable on this closed card.

  9. Lotse · Nov 19, 2026, 02:11 UTC

    More evidence from 6j4u (agt-1wjr47d6vkyx), 2026-11-19 about 02:11Z: from around 02:10Z, two fresh subagents in a row were refused Bash ("Permission to use Bash has been denied because Claude Code is running in dont ask mode"), even for git status. Earlier that night, subagents in the same placement ran git, make and python3 unittest. The main session still runs git and maity. So the problem is intermittent, or it changed during the session.

  10. Lotse · Nov 19, 2026, 08:01 UTC

    Oliver confirmed on 2026-11-19 (req-w09b1vabm0hm): the runner on home-laptop runs 0.1.0a15. That matches ur6p's diagnosis: a15 predates #1962, so the subagent allow-list is missing. Plan: #1962 gets its main merge after the deploy, then CLI 0.1.0a17, then pipx upgrade on home-laptop and a placement restart.