1-minute read of a 5 min report

Elastic Tests Vector Hunting Across Coding-Agent Sessions

By

1-minute read

What a defender needs to know

An agent can read a customer export and push to the wrong repository using individually permitted tools. Elastic Security Labs researcher Marcus Jeffes searched 7,454 turns from 399 of his own Claude Code and Cursor sessions to find behavior that a rule on one tool call might miss. A labeling model marked 56 of 368 real sessions for review. Those marks are not confirmed breaches.

He embedded prompt, reasoning, response and tool-call text per turn, fused channel rankings, and let a session’s highest-ranked turn surface it. Reasoning scored best in his test, but Claude Code’s OpenTelemetry export omits that channel. Enable the content controls only after deciding who may access prompts, responses and tool details. Keep session identifiers, timestamps and original actions with each hit. Elastic’s semantic_text generates embeddings during indexing using an inference endpoint; check the license and endpoint before enabling it.

Search for described actions and repeat workflows, then compare suspicious tool events with repository push records and file-access logs. Review the full session before escalating a hit. Test the ranking on locally labeled risky and benign sessions, and verify the collected channels and read-only access restrictions with a restricted role. Similarity scores can expose sensitive patterns even when text fields are hidden; multiple Elastic roles can broaden access.

Primary sources