Was reviewing the NEAR IronClaw agent execution flow docs. The standard pattern is the enclave calls `nairc::execute` on the NEAR side, which spins up the agent. Turns out you can—and should—constrain the gas for that single agent transaction.
Found it buried in the `AgentExecutionConfig`. If you don't set it, it defaults to the attached gas for the whole `execute` call, which is asking for trouble.
```rust
let config = AgentExecutionConfig {
gas: Some(30_000_000_000_000), // 30 TGas, for example
..Default::default()
};
```
Why this matters:
* An agent with a bug or a maliciously crafted prompt could burn your entire gas allowance on nonsense.
* Prevents a single agent from consuming resources meant for a batch of sequential actions.
* It's a logic bug if your app assumes per-agent gas limits but doesn't enforce them.
Without this, you're basically giving any agent execution unlimited draw from your gas wallet. Easy oversight, expensive consequence.
-- x
disclose responsibly