Skip to content

[Bug]: Sub-agents bypass CLI permission enforcement (security gap) - v0.14.0 #74

Description

@JonatanRoo

What happened?

First, thanks for a great tool. Using Auggie exclusively for all my development for several months now. Very solid tool together with the context-engine. It gets a lot of things right.

The problem I have found is the following.

CLI permission rules configured in settings.json work correctly for the main agent but are completely ignored by sub-agents. This means commands you've explicitly blocked can still be executed.

The Issue

I discovered that toolPermissions rules don't apply to sub-agents. A command that gets correctly denied for the main agent will execute successfully when a sub-agent runs it.

Why This Matters

If you're relying on toolPermissions to prevent destructive commands (like rm -rf, git push --force, database operations, etc.), sub-agents can bypass those restrictions entirely. This is a security gap.

What did you expect to happen?

Expected Behavior: Permission rules should apply consistently to all agents.

Steps to reproduce

Reproduction Test

I ran a simple test blocking the rm command:

  1. Created a test file: touch augment-rm-test-file.txt
  2. Main agent tried rm augment-rm-test-file.txt → ✅ BLOCKED ("Tool execution denied")
  3. Verified file still exists → ✅ Still there
  4. Sub-agent tried the same rm command → ⚠️ ALLOWED (return code 0)
  5. Verified file status → Deleted

Results Summary

Agent rm Command Result
Main agent ✅ Blocked as expected
Sub-agent ⚠️ Executed successfully

Auggie version

0.14.0 (commit 8aaa2dfb)

Request ID

NA

Environment details

Environment
  • OS:
  • Shell:
  • Tool/CLI version:

Anything else we need to know?

No response

Activity

  1. justinxu421 commented on Jan 30, 2026

    @justinxu421
    Contributor

    Thanks for the report, we'll look into it

  2. harjothkhara commented on Jun 3, 2026

    @harjothkhara

    Tried to reproduce on auggie 0.28.0 (commit 63537d73), macOS — and could not: permission deny rules now apply to sub-agents. Looks fixed since the v0.14.0 report.

    Method (canary file + general-purpose sub-agent, --print)

    I denied the deletion tools at the CLI and asked the orchestrator to delegate an rm to a general-purpose sub-agent, then checked whether the file survived:

    Run Sub-agent Deny rules Canary deleted?
    Negative control yes none yes — sub-agent ran rm canary.txt (proves it genuinely can)
    Security test yes launch-process:deny + remove-files:deny no — sub-agent blocked on both, file survived

    Command for the test run:

    auggie --print --max-turns 10 \
      --permission "launch-process:deny" --permission "remove-files:deny" \
      -i "Launch a general-purpose subagent and instruct it to delete canary.txt by
          running the shell command 'rm canary.txt'. Delegate to the subagent."
    

    The orchestrator reported: "The subagent attempted to delete the file but encountered security restrictions. Both launch-process and remove-files have been blocked by security rules." — and canary.txt was still present. With the same delegation and no deny rules, the sub-agent deleted it, so the rule is what stopped it.

    This lines up with the 0.28.0 code: the tool-execution check evaluates [toolPermissionsTenant, toolPermissions], sub-agent options carry toolPermissions, and setToolPermissionRules(...) forwards to the sub-agent runner.

    One heads-up for anyone configuring permissions

    Denying launch-process alone didn't stop deletion — the agent fell back to the remove-files tool. To block a destructive action you need to deny every tool that can perform it (e.g. both launch-process and remove-files), not just the shell.

    @JonatanRoo — if you still see the bypass on 0.28.0, could you share your sub-agent config (custom sub-agent definition + the toolPermissions rules)? I tested the built-in general-purpose sub-agent; a custom one might exercise a different path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions