All posts

Putting access controls around Devin: session recording for AI coding agents (on GCP)

Many assume that an AI coding agent can be trusted to operate without any oversight because its actions are automatically logged by the underlying cloud platform. In reality, without a dedicated gateway that provides session recording, the agent can execute commands directly against databases and services, leaving no immutable record of what was typed or returned. Current practice leaves the audit trail invisible Teams that deploy Devin on Google Cloud often give the model a static service‑ac

Free White Paper

AI Session Recording + GCP VPC Service Controls: The Complete Guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free. No spam. Unsubscribe anytime.

Many assume that an AI coding agent can be trusted to operate without any oversight because its actions are automatically logged by the underlying cloud platform. In reality, without a dedicated gateway that provides session recording, the agent can execute commands directly against databases and services, leaving no immutable record of what was typed or returned.

Current practice leaves the audit trail invisible

Teams that deploy Devin on Google Cloud often give the model a static service‑account key. The key is baked into the container image or mounted as a secret, and the agent uses it to open a direct SSH session to a bastion host, a direct PostgreSQL connection, or a direct Kubernetes exec call. Those connections are long‑lived, have broad scopes, and are never wrapped in a review step. When Devin writes a query, updates a table, or spins up a pod, the command and its result disappear into the cloud provider’s logs, which are not guaranteed to capture the exact payload or to be tamper‑proof. If something goes wrong, engineers have no replayable record of the AI’s exact behavior.

Why session recording matters for AI coding agents

Session recording provides a reliable, per‑connection log that captures every byte sent by the client and every byte returned by the server. For an AI agent, this means you can later replay the exact interaction that led to a data change, a configuration drift, or a security incident. The recorded stream becomes the evidence you need for forensic analysis, compliance reporting, and debugging misbehaving prompts. Without session recording, the only clues are high‑level metrics or cloud‑provider audit logs, which often omit the command text or mask sensitive fields.

What a pure setup can fix, and what it still leaves open

Introducing a policy that requires session recording addresses the visibility gap. It ensures that every interaction is captured for later review. However, if the AI still connects directly to the target service, the request bypasses any enforcement point. There is no place to block dangerous commands, no inline masking of sensitive data, and no just‑in‑time approval workflow. The agent can still reach the backend with the same broad credential, and the recording happens only after the fact, not as a guardrail that can intervene.

Continue reading? Get the full guide.

AI Session Recording + GCP VPC Service Controls: Architecture Patterns & Best Practices

Free. No spam. Unsubscribe anytime.

hoop.dev as the data‑path enforcement layer

hoop.dev sits in the data path between Devin and the GCP resource it needs to reach. It acts as a layer‑7 gateway that terminates the client connection, inspects the protocol, and then forwards the request to the target. Because the gateway is the only point where traffic passes, hoop.dev can apply enforcement outcomes directly.

  • Setup: Identity for Devin is handled through OIDC. The AI presents a token that hoop.dev validates, and the token’s group membership determines whether the session may be started.
  • The data path: All traffic flows through hoop.dev. No command reaches the database, Kubernetes API, or SSH daemon without first being seen by the gateway.
  • Enforcement outcomes: hoop.dev records each session, creating a replayable stream. The recording is stored outside the agent’s process, so even if the AI were compromised the log remains intact. The gateway also supports inline masking, command blocking, and just‑in‑time approvals, but the focus here is the session recording capability.

Because hoop.dev is the sole enforcement point, the session recording cannot be bypassed. If the gateway were removed, the recordings would disappear, which satisfies the self‑test rule: the guarantee only holds because hoop.dev sits in the data path.

Architectural benefits

Placing the gateway at the protocol layer gives you a single source of truth for every interaction. You can define retention policies, integrate the recordings with your SIEM, and grant auditors read‑only access to the logs without exposing the underlying credentials. The approach also scales: the same gateway model works for PostgreSQL, MySQL, SSH, and Kubernetes exec, so you do not need a separate recorder for each protocol.

Getting started

To add session recording for Devin, deploy the hoop.dev gateway in the same VPC or subnet where your GCP resources live. Follow the getting‑started guide to spin up the Docker Compose deployment, register the target connections, and configure OIDC authentication for the AI service account. The documentation on the learn site explains how to enable session recording, set retention, and retrieve replay streams.

FAQ

  • Why do I need session recording for an AI agent? The agent can act autonomously, and any unexpected change needs a reliable audit trail. Recordings let you replay the exact prompt and response that caused the change.
  • Does hoop.dev store the service‑account key? No. The gateway holds the credential only for the duration of the proxied session. The AI never sees the key, and the key is never written to disk on the agent host.
  • How can I access a recorded session? Recordings are stored in the configured backend and can be streamed through the hoop.dev UI or API. You can filter by user, time range, or target resource to locate the exact interaction.

Explore the open‑source project on GitHub to see the full implementation and contribute.

Open source

Save the open-source gateway for agent data access

Hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.

Star and save the repo →More posts