◉ANTIGRAVITY LABJP
Articles/Agents & Manager
◈ Agents & Manager/2026-06-28Intermediate

It Did Things I Never Asked For — Binding an Agent's Task Scope With a Contract

Ask it to fix a button color and you get a refactor, renames, and a dependency bump too. This is a scope problem, not a permission one. Here is a contract that stops at the scope boundary and asks.

antigravity458agents143scope-controltask-contract

✦ Premium Article

I thought I had only asked to "fix the button color." The returned changes included the color fix plus a refactor of a nearby function, a variable rename, and a dependency version bump for good measure. All of them well-meant, and all of them work. But what I wanted to see was a single line of color change; the rest only swelled the review and planted unintended diffs.

When you run several apps in indie development, this "over-helpfulness" quietly adds up. Each instance is small, but stacked together you lose track of which change you actually intended. What I want to bind here is not permission. The write access is fine. What I want to bind is acting beyond what was asked.

This Is a Scope Problem, Not a Permission One

Talk of reining in a runaway agent tends to start with permissions: what can it write to, what can it execute. That matters too, but this problem sits on a different layer. Having permission to fix the color is fine. The problem is doing other things while fixing the color — being over-helpful beyond the task's scope.

Binding with permissions reduces what the agent can do. Binding with scope leaves what it can do unchanged, and limits only "what is allowed this time." The latter is what I wanted.

Hardening Permissions Leaves the Scope Accidents Behind

This distinction is not abstract — it shows up in the tooling. Antigravity CLI 1.1.3, released on July 16, 2026, closed two holes in the permission layer.

The first was headless execution (-p). When it hit a tool that required confirmation, you got one of two outcomes: it hung there, or it silently auto-approved. After the fix it soft-denies, and the allow rule name required to permit the operation is printed to stderr. The second was always-proceed mode, where file writes outside the workspace were being auto-approved by mistake.

As someone who leaves tasks running unattended overnight, the second one gave me a chill. An auto-approval that can write outside the workspace is a permission-layer bug, and it deserved exactly the fix it got.

But once it was fixed, I looked back at my own "button color" incident and realized none of it had been addressed. The writes back then landed inside the workspace, and the permissions were correctly granted. The refactor, the rename, the dependency bump — every one of them is legal from a permission standpoint.

LayerShape of the questionDoes the 7/16 fix help?Accident left over
PermissionMay it write there?Yes — blocks auto-approved writes outside the workspace—
ScopeMay it do that this time?No — the permission stays legitimateThe while-I'm-at-it refactor and rename

The more the permission layer hardens, the more the remaining accidents concentrate in the scope layer. I do not read this as "the tool is safe now, so I can relax." I read it as: the tool got safer, and that made it clear which layer is mine to design.

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦A task-scope contract, distinct from permissions, that stops over-helpful changes
✦How to write an acceptance rule that proposes — without executing — when it wants to cross the boundary
✦How to carry the contract into headless runs and verify drift from the diff afterward
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Antigravity Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $15 for lifetime access
View Membership →

Related Articles

◈ Agents & Manager2026-09-04
Snapshot Your Agents' Effective Scope So You Notice the Day a Default Changes
Antigravity 1.1.25 made Markdown-defined custom agents inherit the surrounding skills, rules, and subagents by default. Here is the snapshot-and-diff routine I now use to check whether an agent I meant to keep narrow quietly got wider after an update.
◈ Agents & Manager2026-08-21
Why I Check Description Overlap Before Turning On inheritCustomizations
CLI 1.1.14 collapsed markdown agent inheritance into a single inheritCustomizations switch. Here is what happened when I actually inventoried the 47 skills in my workspace and decided the switch on description overlap rather than on context size.
◈ Agents & Manager2026-05-27
Record & Replay for Antigravity Agents
How to deterministically replay a failed Antigravity Agent run offline, drawn from a month of running it across four production sites. Covers boundary recording, R2 + KV storage costs, PII masking, and a working TypeScript harness.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links