ANTIGRAVITY LABJP
Articles/Agents & Manager
Agents & Manager/2026-07-29Advanced

A Typo in agent.md Quietly Widened My Permissions — Writing a Strict Frontmatter Lint

Misspelled keys in agent.md frontmatter do not raise errors. They fall back to defaults, and for permission fields that fallback points the wrong way. Here is the failure I hit, the lint I wrote to catch it, and what the measurements showed.

Antigravity343Agents23Configuration4Permissions2CI6

Premium Article

A subagent whose only job was assembling release notes somehow had the full MCP tool list available.

This is a setup I run as an indie developer, and I try to keep subagent permissions as narrow as they can be. I had never intended to give that one MCP access. I was fairly sure I had written it down. Opening the file confirmed it — the line was right there.

inheritMCP: false

MCP instead of Mcp. A single character of casing.

That one character had inverted my intent completely.

Nothing fails, so nothing tells you

The awkward part is that the config file loaded fine. No startup warning, no degraded mode. The agent came up and behaved normally.

The reason is simple: the frontmatter is perfectly valid YAML. I confirmed it directly.

import yaml
 
raw = open("agents/release-notes.md").read().split("---")[1]
d = yaml.safe_load(raw)
 
print("parse: OK, keys =", list(d))
print("d.get('inheritMcp') ->", d.get('inheritMcp'))
print("d.get('inheritMCP') ->", d.get('inheritMCP'))

Output:

parse: OK, keys = ['subagent', 'inheritMCP', 'commandExecutionPolicy', 'model']
d.get('inheritMcp') -> None
d.get('inheritMCP') -> False

To the parser, inheritMCP is just a valid key. The false value was read correctly. It is simply that nothing ever goes looking for that name.

The consumer looks up inheritMcp, finds nothing, and applies the default. My false sits in the file, syntactically perfect, never once consulted.

The fallback pointed the wrong way

This is where reality diverged from what I had assumed.

I had a vague belief that configuration mistakes fail safe — that an unreadable setting would resolve toward the stricter option. In practice, an unspecified key resolves to whatever default is most convenient. And for permission settings, convenient almost always means permissive.

KeyWhat I intendedWhat the typo actually appliedDirection
inheritMcpfalse (no MCP inheritance)Default (inherits)Permissions widen
commandExecutionPolicySomething like denyDefault (ask)Execution path remains
hiddentrue (keep it out of listings)Default (visible)Exposure increases

So the lines that restrict are precisely the ones a typo silently cancels. Lines that loosen point the same way as the defaults, which means a typo there produces no symptom at all — and no opportunity to notice.

Syntax errors get reported. Semantic mistakes do not. That is true of configuration in general, but when the subject is permissions the cost of the asymmetry changes.

One caveat worth stating plainly: the specific default values can shift between versions. The table above reflects what I observed in my own environment, so verify against your version before relying on it. The lint below keeps those defaults as a clearly marked constant for exactly this reason.

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
Why a misspelled key becomes a silent default fallback rather than an error, and why that direction favors wider permissions
A ~120-line lint (PyYAML + difflib) that escalates only permission-relevant typos to ERROR and leaves the rest as WARN
Measured results: 6 errors across 7 real files, ~100 ms for 200 files, and the thresholds I settled on after weeks of use
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 $10 for lifetime access
View Membership →

Related Articles

Agents & Manager2026-07-10
When Your Agent's Files Vanish Into .gitignore — A Pre-Commit Detection Gate
When an agent writes files that match .gitignore, the diff review looks perfect but nothing lands in the commit. Here is a gate script that catches ignored build output before you push, plus the tuning it needs.
Agents & Manager2026-07-16
When to Hand Your Agent the Next Instruction: Waiting, Interrupting, and Queuing, Measured
Antigravity v2.3.0 added message queuing and Send Now. I measured waiting, interrupting, and queuing against the same yardstick, found that 41% of queued instructions arrive stale, and cut rework from 22% to 9% with a twenty-line stamp.
Agents & Manager2026-07-13
Passing API Keys to Agents Safely: Runtime Env Injection and Log Redaction
How to hand secrets to an Antigravity agent without leaving them in your repo or your logs, using runtime environment injection and output masking.
📚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
See all →