CYBERSECURITYTRACKER
TRACKING7,811 stories in this site build1,697 vulnerability news stories in this site build
Permanent story citation

13 million tool calls: auditing every AI coding agent action with Elastic Agent

This page keeps the story as Cybersecurity Tracker first published it. If the tracker later corrects it, the correction appears below the original and never replaces it.

Back to newsStory 4359

As cited

Copy frozen at (site build).

ai security

13 million tool calls: auditing every AI coding agent action with Elastic Agent

Elastic engineers built a hook-based logging system to audit AI coding agent activity by capturing tool calls, file operations, and MCP server interactions from Cursor and similar agents. The system uses a 280-line bash script deployed via Cursor's lifecycle hooks, logs events as JSONL, and ships them to Elasticsearch through Elastic Agent. Analysis of 13 million tool-call events from over 1,100 machines revealed agents spend most of their time reading files rather than executing commands, with more than 300 distinct MCP servers in use across the fleet.

Why it matters: Security teams need visibility into AI agent actions running under developer credentials, since agents can execute shell commands, edit files, and access sensitive files indistinguishably from human activity, creating blind spots for incident response and threat hunting. Organizations deploying Cursor, Claude Code, or similar agents should implement hook-based auditing to detect credential file access, download-and-execute patterns, and unauthorized MCP server connections before an incident occurs.

Source published
First seen by Cybersecurity Tracker

Source attribution

Correction

Correction recorded as of .

ai security

13 million tool calls: auditing every AI coding agent action with Elastic Agent

No summary had been written when this copy was frozen.

First seen by Cybersecurity Tracker

Source attribution

Correction

Correction recorded as of .

ai security

13 million tool calls: auditing every AI coding agent action with Elastic Agent

Elastic documented a system for capturing the actions of artificial intelligence (AI) coding agents running on developer endpoints through Cursor agent hooks, logging over 13 million tool calls across 1,100 machines since May 2026. The collector uses a 280-line bash script to record each AI agent invocation (shell commands, file reads, Model Context Protocol (MCP) server calls) as structured JSON logs, which Elastic Agent forwards to Elasticsearch for querying and analysis. The deployment prioritizes visibility without disrupting workflows, restricts log access by role, and omits sensitive content like prompts or model reasoning.

Why it matters: Security teams lack visibility into AI agent behavior on endpoints because it occurs under developer credentials and looks indistinguishable from human activity to endpoint detection and response (EDR) tools; hook-based auditing lets practitioners detect credential file access, shell injection patterns, and unauthorized MCP server usage that might indicate prompt injection or malicious supply-chain compromise.

Source published
First seen by Cybersecurity Tracker

Source attribution

Correction

Correction recorded as of .

ai security

13 million tool calls: auditing every AI coding agent action with Elastic Agent

Elastic documented a system for capturing the actions of artificial intelligence (AI) coding agents running on developer endpoints through Cursor agent hooks, logging over 13 million tool calls across 1,100 machines since May 2026. The collector uses a 280-line bash script to record each AI agent invocation (shell commands, file reads, Model Context Protocol (MCP) server calls) as structured JSON logs, which Elastic Agent forwards to Elasticsearch for querying and analysis. The deployment prioritizes visibility without disrupting workflows, restricts log access by role, and omits sensitive content like prompts or model reasoning.

Why it matters: Security teams lack visibility into AI agent behavior on endpoints because it occurs under developer credentials and looks indistinguishable from human activity to endpoint detection and response (EDR) tools; hook-based auditing lets practitioners detect credential file access, shell injection patterns, and unauthorized MCP server usage that might indicate prompt injection or malicious supply-chain compromise.

VendorsMicrosoftAppleElastic
Source published
First seen by Cybersecurity Tracker

Source attribution

Glossary