All guides

    Guide

    What are the security risks of AI sub-agents?

    Updated

    Short answer

    Subagents can expand authority through inherited credentials and tools, transmit information across new recipients, or return untrusted instructions as trusted recommendations. Define each delegated task, constrain the worker's effective access, and verify the complete parent-to-worker-to-effect path. A separate context window does not by itself establish process or credential isolation.

    Define the delegated job#

    Record the parent task, worker assignment, expected output, owner, available tools and permitted resources. The worker should receive the authority required for its assignment. A dependency investigation does not automatically authorize production changes, new external services or access to unrelated repositories.

    Identify whether the worker is a separate local context, process, container or remote service. Those architectures have different execution and data boundaries. Do not infer operating-system isolation from the existence of a separate conversation.

    Inspect inherited and additional authority#

    Check the actual working directory, mounts, environment, credentials, network and tool configuration. Inspect permissions the worker inherits from the parent and tools explicitly added by its definition. A role called reviewer can still have a write-capable credential.

    Claude Code's subagent documentation describes its own tool and permission behavior. Match that documentation to the installed version. Other frameworks need their own implementation review; similar role names do not establish equivalent restrictions.

    Treat the handoff as a data and authority boundary#

    A worker can return useful facts and recommendations. Its summary cannot grant new authority. Require consequential recommendations to identify the source, affected resource, proposed effect, required permission and uncertainty. A repository note repeated by a worker remains information from that repository.

    Two agents can combine risks when one reads sensitive information and another can transmit it. Inspect the composed path and recipient, including return messages. Avoid forwarding full confidential records when a restricted evidence reference or minimized summary completes the job. Agreement between agents is not independent proof of permission.

    Constrain external agent communication#

    List approved services and recipients, then enforce the relevant restrictions at the actual network, tool or service boundary. Review helper processes and remote workspaces separately. A prompt asking workers to stay internal does not remove an available external connection.

    Assign an owner to new worker definitions, credential changes and exceptions. Record the resource, operation, recipient and expiry of a necessary exception. Keep production and sensitive exports outside the delegated assignment unless the appropriate owner approves them.

    Verify the complete path#

    Use a disposable repository, synthetic sensitive markers and a controlled recipient. Test a legitimate delegation and a variation that proposes an unrelated transfer. Record the parent assignment, worker definition, relevant versions, proposed call, decision and observed effect. Inspect how the parent handles the worker's return value and whether it repeats the operation through another route.

    A passing example establishes only the tested architecture and configuration. Add cases for actual nesting and external routes before expanding authority. Preserve missing evidence as a gap with an owner.

    Evaluate supported action checks#

    Harden evaluates supported pending agent calls using relevant task context and policy. Verify which worker calls pass through the configured integration and what context is available. A checked parent call does not establish coverage of an external agent or independent process. Keep scoped identities, isolation and recipient controls in place.

    Bring one allowed and one prohibited handoff to Control, or Book a Call with the actual parent-worker route. For organizational ownership, use our enterprise governance guide.

    FAQ

    Related questions

    How can two safe agents combine to create risk?

    Their combined workflow can cross a boundary not examined in either isolated review. Trace which agent reads information, which can modify or transmit it, and what authority the parent grants at the handoff. Verify the composed effect rather than relying on separate role labels.

    Does a separate context window isolate credentials?

    No such conclusion follows from context separation alone. Inspect the worker's runtime, environment, identity and tools. The execution architecture determines whether credentials and resources are actually isolated.

    How do enterprises restrict unapproved external agents?

    Inventory recipients and routes, apply supported network and tool restrictions, and test the effective boundary. Review helper processes and hosted workspaces separately. Keep exceptions owned and time bounded.

    Should subagents inherit every parent tool?

    Grant only tools and effective resource access needed for the delegated job. A short tool list can still include a powerful credential, so inspect authority as well as names. Verify useful work and a prohibited variation.

    Does Harden automatically cover all workers?

    Verify the supported integration, actual worker route and available context. Do not infer coverage of independent processes, remote agents or arbitrary nesting from a successful parent-agent check.

    Sources

    1. Claude Code subagents
    2. Harden AIF research and evidence

    Start free at harden.run

    Full Enterprise access, free for 60 days: unlimited developers, custom policies, centralized visibility, no commitment.