Why session recording matters for Claude agents
How can you be sure that every code suggestion generated by Claude and executed against BigQuery is traceable?
Claude, when used as a coding assistant, translates natural‑language prompts into SQL statements that run directly on your data warehouse. The convenience is undeniable, but it also introduces a blind spot: a single mistaken suggestion can expose sensitive rows, overwrite tables, or trigger costly queries. Without a reliable audit trail, security teams struggle to answer basic questions such as who triggered a particular data export or whether a compliance‑critical column was read.
Most organizations already enforce strong identity controls. Engineers authenticate to an identity provider, receive OIDC tokens, and are granted the least‑privilege roles needed to query BigQuery. Those tokens prove who is connecting, but they do not capture what is sent over the wire. The request travels straight from the Claude process to the BigQuery endpoint, bypassing any central checkpoint that could record the interaction.
That gap is the precondition this guide addresses. Identity verification is necessary, yet it leaves the actual query path unobserved. To obtain true session recording you need a component that sits in the data path, inspects each request and response, and persists an audit record before the query reaches BigQuery.
Implementing session recording with hoop.dev
hoop.dev provides the required data‑path gateway. It runs a lightweight agent inside the same network as BigQuery and proxies every Claude‑initiated connection. Because the gateway terminates the protocol, it can capture the full request‑response cycle, apply inline masking if needed, and write an audit record for each session. In this architecture hoop.dev is the only system that creates the session‑recording evidence; the identity provider and the Claude process never produce that log on their own.
When Claude connects through the built‑in MCP server, the MCP client points to the hoop.dev endpoint instead of the raw BigQuery address. The gateway authenticates the user’s OIDC token, checks group membership, and then forwards the SQL statement. Before forwarding, hoop.dev stores the statement and the corresponding response in its audit backend, ensuring a complete replayable trace.
The benefits are threefold:
