Skip to content
View original post on X: Rohan PaulX· 43/100AI score43/100

AI security agents spend most tokens on code understanding, and AVRI cuts cost

AISummary

A study of 200 runs across 4 AI agents hunting security bugs found 60.4% of tokens went to understanding code and reasoning about how to trigger the bug.

Only 24.4% of comparisons against the plain agent kept success while lowering cost, so the authors built AVRI, which returns related code together and saves links between program input and the unsafe operation.

On 20 new tasks, AVRI cut total cost 18.0% for Codex and 23.7% for OpenCode without lowering success or recall.

Post on XView on X
Rohan PaulVerified on X
@rohanpaul_ai

AI agents that hunt security bugs spend 60.4% of their tokens understanding code and reasoning about how to trigger the bug, so that is where cost cuts should aim.

AI agents hunting security bugs can burn millions of tokens without producing an input that crashes the program. Across 200 runs from 4 agents, 60.4% of tokens went to understanding code and reasoning about how to trigger the bug.

Existing cost-saving methods rarely helped. Only 24.4% of head-to-head comparisons with the plain agent kept success at lower cost.

So they built AVRI, a tool that returns related code together and saves the links between program input and the unsafe operation. On 20 new tasks, it cut total cost by 18.0% for Codex and 23.7% for OpenCode without lowering success or recall.

Before adding generic cost tricks to a security agent, measure where its tokens go and let it reuse what it learned about the code.

Source: Rohan Paul · x.comPublished · added here