Manuscript Offprint

arXiv:2609.05232

Substrate-Aware AI Agents: Execution Context as a First-Class Input

Manu Agrawal

Abstract

Autonomous AI agents increasingly select actions in environments whose memory, execution-time, runtime, compute, and operational constraints determine what counts as a suitable plan. We call the absence of this execution context from an agent's planning state substrate blindness. We test this general proposition through numerical code generation, where selected implementation choices and operational consequences are directly observable. Three frontier model configurations-Anthropic Claude Opus 5, OpenAI GPT-5.6-Sol, and Google Gemini 3.7 Flash-generate code for a high-dimensional pairwise Euclidean-distance task either from the task alone or with a 128 MB RAM and 10.0 s wall-time contract. Contract disclosure reduced measured peak process memory in 13 of 14 executable index-aligned task-only versus contract-disclosed comparisons and reduced mean wall time in all three cohorts, making execution up to 3.1x faster. Across the audited corpus, disclosure produced structural code changes including bounded blocking, float32 retention, upper-triangle traversal, and in-place or memory-mapped buffers. At a tighter 96 MB contract, independently sampled contract-disclosed cohorts achieved correct-and-within-budget outcomes of 4/5 for Claude Opus 5, 5/5 for GPT-5.6-Sol, and 3/5 for Gemini 3.7 Flash, compared with task-only outcomes of 0/5, 1/5, and 0/5; cohort mean MaxRSS and wall time were 49-74% and 35-64% lower than their task-only references. These results establish a controlled proof of concept for substrate-aware agent planning: a minimal execution contract induces proactive structural adaptation in generated programs, shifting computation away from unconstrained allocations and substantially improving observed resource-time profiles before execution.

1. Substrate blindness

An agent can receive a complete task specification and still lack the information needed to produce a suitable action. The missing information is often not about the task itself; it is about the environment in which the task must be carried out.

This matters because modern computation is executed under real operating contracts. Kubernetes uses CPU and memory requests to schedule workloads and enforces limits at runtime [1]. Cloud Run terminates instances that exceed their configured memory limit [2]. AWS Lambda couples configured memory, CPU resources, and duration-based billing [3]. Runtimes impose language and dependency compatibility; tools have latency, reliability, permission, and quota boundaries. These conditions determine whether a plan is merely plausible or actually deployable.

Autonomous agents increasingly operate in harnesses that generate code, execute it, inspect outcomes, and iterate across long-running workflows. In many such systems, the harness, scheduler, or deployment configuration defines or can expose relevant parts of the execution contract—including memory limits, runtime versions, timeouts, tool permissions, and quotas—even when that information is absent from the model's inference context. When this decision-relevant context is available during planning, an agent can choose against the relevant operating envelope before it relies on runtime feedback. This creates a practical opportunity to prevent deployment mismatches and reduce later repair work when an otherwise plausible plan is unsuitable for its target environment.

We call the failure to condition a plan on this information substrate blindness. The proposition of this paper is direct: execution context is decision-relevant information, and agents should receive it before they select a computational plan.

We demonstrate the proposition through numerical code generation, where the chosen implementation and its outcome can both be inspected. The intervention is minimal in content but consequential in effect: it supplies an operating contract without prescribing an algorithm, fine-tuning a model, or waiting for a failed execution, and asks whether that information changes what the model chooses to build.

Our contributions are:

Substrate-Aware AI Agents

  • Concept. We formulate substrate blindness as an information-asymmetry problem in agent planning: the task is visible to the agent, while the operational environment that defines solution suitability is not.

  • Demonstration. We provide a controlled two-condition generation study across three provider-configured model cohorts showing that pre-execution RAM/time disclosure changes generated implementations and substantially improves observed resource-time profiles.

  • Evidence. We preserve the generated programs, execution profiles, and a source-linked audit, revealing concrete adaptation in implementation choices rather than superficial budget acknowledgement.

  • Research direction. We articulate a broader substrate-awareness agenda for runtime, accelerators, tools, quota, reliability, and cost, grounded by the demonstrated memory/time intervention.