Agents Carry Hidden Costs
7 stories · ~7 min read

If You Only Read One Thing
The expensive part of an agent is increasingly the context it carries, not the answer it writes. GitLost's proof of concept shows how cross-repository context becomes an exfiltration path; OpenAI's new metering makes the same context the bill. GitLost Crosses the Boundary and OpenAI Meters the Context are two sides of one shift: agent state is now an operating liability.
GitLost Crosses The Boundary
GitHub built an agent with read-only access, isolated execution, filtered writes, and no direct secrets. It still disclosed a private repository through a public issue because every individual operation was allowed.
On July 6, Noma Security published GitLost, a proof of concept against GitHub Agentic Workflows. The vulnerable workflow triggered on an assigned issue, read its title and body, could fetch repositories across the organization, and could post a comment. An unauthenticated attacker opened a plausible public issue; the agent retrieved README files from public and private repositories, then placed the private contents in a public comment. Noma found that adding the word “Additionally” was enough to get past the refusal guardrail.
The important prior art is GitHub's own threat model. Agentic Workflows compile plain-English Markdown into constrained GitHub Actions, keep the agent in a container, proxy credentials, make repository access read-only by default, and buffer writes through a “safe outputs” service. GitHub's security architecture explicitly assumes prompt injection and logs each trust boundary.
Why it matters: GitLost did not escape the sandbox or steal a token. It composed three legitimate capabilities: untrusted public input, privileged private reading, and permitted public output. That is a confused-deputy failure, where software uses its own authority on behalf of the wrong caller. A model filter sits inside that chain, but the durable boundary has to sit between the channels. Public-authored issues should not be able to cause private-repository reads, and private data should carry a label that survives summarization into a comment.
This changes the meaning of least privilege for agents. Limiting an agent to “read” access is insufficient when it can transform what it reads and publish the result through an approved write. Permission systems must constrain information flows, not merely tool verbs. GitHub said in March that visibility- and author-aware controls were coming; GitLost is evidence that those controls belong below model judgment, where a one-word prompt variation cannot negotiate them away.
Room for disagreement: The proof of concept required an unusually dangerous configuration: a public trigger, cross-repository private access, and a public comment output. That narrows the exposed population. It does not weaken the architectural lesson, because cross-repository context is precisely why teams grant organization-wide agents broader access than conventional bots.
OpenAI Meters The Context
The enterprise agent has acquired a unit cost, and the price schedule rewards memory more than brevity.
As of July 6, ChatGPT Workspace Agent runs use token-based credits rather than a fixed run charge. OpenAI's Business release notes say Workspace Agents, ChatGPT Work, Excel, and PowerPoint draw from the same general agentic pool as their pricing takes effect. That turns separate products into competing consumers of one workspace budget.
The rate card exposes the mechanism. For GPT-5.5, one million fresh input tokens cost 125 credits, cached input costs 12.5, and output costs 750. OpenAI's worked example uses 20,000 fresh input tokens, 80,000 cached tokens, and 5,000 output tokens for 7.25 credits; a typical end-to-end run is estimated at 5 to 25 credits. GPT-5.4's rates are exactly half those of GPT-5.5.
Why it matters: Agent economics now depend on workflow shape. Cached input is one-tenth the price of fresh input, while output is six times the fresh-input rate and sixty times the cached-input rate. A stable instruction and repository prefix can therefore be cheap even when it is large; repeatedly rebuilding context, spawning isolated branches, or producing verbose artifacts can be expensive even when each step looks small. The bill measures orchestration, not just model choice.
That creates a second-order incentive for vendors to own the agent runtime. The surface that controls cache keys, context compaction, subagent inheritance, and output formats controls the effective price. An open Codex issue illustrates the sensitivity: forked subagents can receive new cache keys and rebill inherited parent context as fresh input. It is a user report, not a confirmed general defect, but it shows why headline token prices cannot describe task cost without cache-hit and branching data.
Room for disagreement: Credits abstract away dollars, and included allowances mean many teams will not feel the marginal cost immediately. Yet a shared pool makes the accounting matter before cash billing does: one verbose automation can consume capacity that would otherwise serve coding, spreadsheets, or research.
The Contrarian Take
Everyone says: Prompt injection is a model-quality problem. Better instruction hierarchy and stronger refusal training will eventually make agents safe enough to trust with broad access.
Here's why that's wrong (or at least incomplete): GitHub already assumed the model could be compromised, isolated it, hid credentials, constrained writes, and inspected outputs. GitLost still worked because the permitted read channel and permitted comment channel formed an exfiltration route. The word “Additionally” is not the important exploit; the important exploit is that model judgment connected public input to private data. Better refusals may lower attack frequency, but only visibility-aware access and output controls can bound the consequence of the refusal that eventually fails.
Under the Radar
-
Bun turned tests into a migration specification — Bun's Zig-to-Rust rewrite used a language-independent TypeScript test suite with roughly one million assertions to supervise a million-line agent-authored port. The 11-day loop consumed an estimated 5.9 billion uncached input tokens, 72 billion cached reads, and 690 million output tokens, costing about $165,000 at API rates; the result has run inside Claude Code since June 17 with Linux startup about 10% faster. The breakthrough was not autonomous coding but an executable definition of equivalence. (Simon Willison)
-
Better tools made Copilot review worse — GitHub replaced specialized review tools with the shared
grep,glob, andviewtools used by Copilot CLI. Cost rose and useful findings fell until the instructions were reshaped around review behavior: start from the diff, narrow first, then read exact evidence. That change cut average review cost roughly 20% at the same quality, showing that a tool's semantics include the workflow its description elicits. (GitHub)
Quick Takes
-
Pydantic AI made limits visible inside the run — Version 2.9 adds cumulative usage reporting to
clai, exposes usage limits to tools and capabilities, and fixes a cancellation deadlock. It also publicly documents an authorization advisory already patched in 2.5.0, where malformed message history could bypass dangling-tool-call stripping unless sensitive tools enforced their own approval or authorization. (Source) -
Cline loosened the Vertex catalog boundary — Version 4.0.8 adds more Google Vertex models and a free-form field for custom model identifiers. The change is small, but it moves model availability from client release cadence to provider metadata, reducing the lag between a Vertex endpoint appearing and a coding agent being able to route work to it. (Source)
-
Vercel AI SDK widened the speech-provider layer — Version 7.0.22 adds Cartesia with Sonic 3.5 generation, Ink-Whisper batch transcription, and Ink 2 realtime transcription. Voice is becoming a provider-routing problem inside the same SDK used for text agents, which means latency, interruption, and transcription model choice can move without rebuilding the application shell. (Source)
The Thread
Agents collapse distinctions that ordinary software keeps separate. Context can be both data and instruction; read access can become publication; a cached prefix can be memory and a billing discount; a generic tool can be technically better and behaviorally worse. The common control surface is the runtime around the model: information-flow policy, cache lineage, task-shaped tool descriptions, and usage traces. Model capability determines what an agent can attempt. Runtime structure determines what the attempt costs and what it can damage.
Predictions
New predictions:
- I predict: By September 30, GitHub will ship or formally document an Agentic Workflows policy that blocks public-authored repository objects from driving private-repository reads or public outputs without an explicit visibility override. (Confidence: medium; Check by: 2026-09-30)
Issue date: July 11, 2026 · Generated: 3:36 AM ET
Tomorrow morning in your inbox.
Subscribe for free. 10-minute read, every weekday.