All guides

    Guide

    How do I monitor AI coding agent activity across my engineering org?

    Updated

    Short answer

    Record every command, file edit and push each agent makes on the developer laptop. Tie each record to the session's intent and to the decision made on it, under one policy across every agent. Start watch-only to learn what normal looks like, then enforce on the actions you can't undo. Keep code and prompts on the machine and export only the records to your SIEM. Vendor usage telemetry won't do this on its own: it shows who used an agent and how much.

    Usage telemetry answers a different question#

    Most teams start with what the vendors already export. That's a sensible first step. It tells you who is using agents and how much.

    Claude Code, for example, can send telemetry over OpenTelemetry, including tool events (Anthropic, Claude Code monitoring). That covers adoption and spend. To see what the agent did to your systems, you need more detail than the defaults give you.

    What the exports leave out by default#

    Per Anthropic's docs, prompt content is "Redacted by default." Logging tool parameters (Bash commands, MCP server and tool names, tool input) is "default: disabled."

    You can turn both on. Then you're shipping prompt text and command arguments to a collector, and those can contain secrets and source code.

    Other gaps matter more than the defaults:

    • One agent at a time. Each agent you run has its own telemetry, and you'd have to collect and normalize each one separately.
    • No check against intent. A tool event records that a command ran. It doesn't say whether that command matched what the developer asked for.
    • No context. The same command is fine in one session and harmful in another. A log line without the session's goal next to it can't tell you which.

    EDR sees the process, not the intent#

    Your EDR already runs on every laptop, so it's tempting to call it done. It sees a git process, a curl process, a write to a file. That's the operating system's view.

    It doesn't see that the agent read a .env file because a README told it to, then sent the contents to a host the developer never mentioned. Each process looks ordinary. The problem is the sequence.

    Keep the EDR. It can't answer "was this action what the session was for?" More in securing coding agents on developer laptops.

    Volume makes this a machine job#

    In our own use, an agent session averages 145 actions, and long ones go past 1,000. Nobody reads that.

    Approval prompts don't fix it. Anthropic reports that "in practice users accept 93% of them anyway" (Anthropic, Claude Code auto mode). A prompt people approve 93% of the time is mostly a click. It doesn't leave you an org-wide record either.

    What to record#

    For risk monitoring, each action needs its own record with:

    • The action itself: the command, file edit or push, as it was about to run
    • The session it belongs to and the stated intent
    • Which agent, which developer, which machine
    • The decision (allow, block, ask, redact, log only) and the reason
    • A timestamp you can line up with your SIEM

    With that you can query the whole fleet: which agents touch credentials, which sessions got blocked, which repos see the most pushes. If you run several agents, put them all under one policy across coding agents so the records share one shape.

    Start watch-only to set a baseline#

    Don't turn on blocking first. Run in log-only mode for a few weeks and look at what agents actually do on your developers' machines.

    You'll learn what normal looks like, which policies would fire often, and where you'd slow people down. Then pick what to enforce. Start with the small set of actions you can't undo: secrets leaving the machine, force-pushes, publishes. There's a staged plan in rolling out Claude Code to 1,000 engineers.

    Keep code and prompts on the machine#

    Centralized visibility shouldn't mean centralized source code. If your monitoring streams every prompt and command argument to a vendor cloud, you've made a new copy of your most sensitive data.

    Make the decision locally instead, and export only the record to your own SIEM. Ask any tool you evaluate these questions:

    • Where is the check made?
    • What leaves the machine?
    • What happens if the check can't run?

    Where Harden fits#

    Harden Agentic Integrity Foundation (AIF) runs on the developer laptop, outside the agent, at the agent's pre-execution hook. It checks every command, file edit and push against the session's intent before it runs. Decisions are made locally, in about 28 ms. Nothing leaves the machine. If the check can't run, the action doesn't run.

    It starts watch-only, so you get the baseline first. You push it with the MDM you already run, and one policy covers every agent. Every decision is recorded on the machine, and you choose whether to export those records to a SIEM such as Splunk or Coralogix.

    It's one layer. It doesn't replace least privilege, scoped credentials or egress policy. Exfiltration spread over several separate calls is still the hard case. For the wider program, see governing coding agents in the enterprise.

    FAQ

    Related questions

    Is OpenTelemetry from my coding agent vendor enough?

    It's enough for adoption and cost. For risk, it falls short. In Claude Code, prompt content is redacted and tool parameters are off by default. You'd also collect from each agent separately, and the events don't say whether an action matched the session's intent.

    Can I monitor agents without sending code or prompts to a vendor?

    Yes. Check each action on the laptop and export only the decision record to your own SIEM. Source code and prompt text stay on the machine.

    Why start in watch-only mode?

    Watch-only mode shows what agents really do before you block anything. You get a baseline, see which policies would fire, and choose what to enforce without breaking developers' work.

    Doesn't my EDR already cover this?

    EDR sees processes and file writes. It doesn't know what the session was meant to do. So it can't tell a normal git push from one that follows an injected instruction.

    How do I cover more than one agent?

    Check actions at each agent's pre-execution hook under one policy, deployed through your MDM. That way you don't have to stitch together a separate telemetry feed for each agent.

    Sources

    1. Monitoring - Claude Code Docs
    2. Claude Code auto mode (Engineering at Anthropic)

    Start free at harden.run

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