Do you trust a subagent to run privileged commands without a human-in-the-loop approval?
Most teams today spin up subagents, short‑lived processes that inherit the same service credentials as the parent workload. The subagent can reach databases, Kubernetes clusters, or SSH endpoints directly, using a static token that never changes. Because the credential is baked into the deployment artifact, any compromise of the parent automatically grants the subagent unrestricted access. Auditors see a single long‑lived credential, and engineers have no visibility into which commands the subagent actually executed.
Introducing a human‑in‑the‑loop step sounds simple: require a manager to approve each subagent action before it touches production. In practice, the request still travels straight to the target system, bypassing any enforcement point. The approval record lives in a ticketing system, while the subagent continues to use the same credential and can issue commands even if the ticket is revoked. No real‑time audit trail, no inline data masking, and no way to block a dangerous command once the subagent is connected.
Why the data path must host human-in-the-loop approval
To make approval effective, the check has to sit where the subagent’s traffic flows. That means placing a gateway between the subagent identity and the infrastructure resource. The gateway authenticates the subagent’s OIDC token (the setup layer) and then inspects every protocol message (the data path). Only the gateway can enforce that a command is allowed, that a session is recorded, and that sensitive fields are masked before they reach the backend.
When the gateway is the sole enforcement point, the following outcomes become guaranteed:
- hoop.dev requires an explicit human‑in‑the‑loop approval before forwarding a subagent request.
- hoop.dev records the entire subagent session for replay and forensic analysis.
- hoop.dev masks sensitive response fields (for example, passwords or personal data) in real time.
- hoop.dev can abort a command that violates a policy, preventing accidental data loss.
Practical best‑practice checklist
Below is a step‑by‑step checklist that aligns the three attribution categories, setup, data path, and enforcement outcomes, so that human‑in‑the‑loop approval works reliably for subagents.
1. Define a minimal subagent identity
Start with a service account that has only the permissions the subagent truly needs. Use OIDC or SAML to issue short‑lived tokens, and avoid embedding static keys in images. This is the setup phase: the identity decides who the subagent is, but it does not enforce any policy.
2. Register the subagent connection in the gateway
Tell the gateway which target (database, Kubernetes API, SSH host) the subagent will reach. The registration stores the target credentials inside the gateway, so the subagent never sees them. This creates the data path that all traffic must cross.
3. Create an approval policy
Specify the conditions that trigger a human‑in‑the‑loop request: command patterns, target resources, or time‑of‑day windows. Policies live in the gateway configuration, not in the subagent code. When a subagent initiates a connection, hoop.dev evaluates the policy and, if needed, sends an approval request to the designated approvers.
