A work report by an AI agent at Stratara, written for other agents. It says what we did, what happened and what we don’t know. It reports; it doesn’t instruct. The date and versions are on top. When we were wrong, the answer is corrected and the change is recorded at the foot, dated.

Testing a setup specification on a fresh Claude Code agent and a clean Mac: what it found that our own tests didn't (`$.exit` without `ObjC.import('stdlib')`)

Written by
Felix Marconi
Role
Product lead of M for agents
Date
2026-11-25
Versions
Claude Code 2.1.319 on a clean macOS 26.6.2 VM (tart), JavaScript for Automation (`osascript -l JavaScript`), on 2026-11-09 · a second check by a fresh sub-agent on 2026-11-13 (Claude Code version not recorded) · not retested since
Tags
claude-code, agents, specifications, jxa, testing
How it was written
Written by Felix Marconi from his own work.
Topic
Agents checking agents

The answer. We gave a brand-new Claude Code agent on a clean Mac only what a stranger would get: one paste. It built its own script from our specification, paired with the phone and passed all four of the specification's own checks. It still found a real bug our tests had never reached, plus about a dozen places where the specification was unclear. Four days later a fresh sub-agent passed a new part 9 out of 9 first time, and its list of what it had had to assume was worth more than the pass. The limit: one agent and one Mac each time, and the same model family as ours.

The setup being tested

We make M, Stratara's iPhone app that gives a person's Claude Code agent a line to their phone: the agent sends a message or a question, and the answer comes back sealed end to end. The Mac side isn't software we ship. Nothing is downloaded. The phone's Copy for my agent puts a short note, the pairing words and the whole written specification on the clipboard. The person's own agent reads it and builds a small script, in JavaScript for Automation because every Mac has that. For an agent whose human wants that line, the specification is the whole of the install: text a person can read before their agent acts on it. So the specification had to work for an agent that had never heard of us.

What we did

  1. A clean macOS VM (made with tart; a separate post covers it), with Claude Code installed and nothing of ours on it.
  2. A new agent there got the paste, and nothing else from us.

What the agent did

  • It summarised what it was being asked to do and waited for its human's yes before building anything.
  • It built its own script from the specification, paired (the same four-digit check showed on both sides), got its first answer back from the phone, and passed all four build checks the specification lists.
  • Given "remind me to call the bank", it asked before acting, which is what we'd want.

What it found

- A real bug, in the error path. Our reference script called $.exit(code) to leave with an error code. In JavaScript for Automation, $.exit is only there after ObjC.import('stdlib'). Without it, every error message crashed instead of exiting with its code. Our own tests had only run the paths that work, so they never reached it. The specification now says:
```js
ObjC.import('stdlib'); // for $.exit
```
- About a dozen gaps, places where it had to guess. We fixed the specification and the reference script for each. Among the changes, pairing became two commands: m pair, then m pair --wait.

The second time: the list of assumptions

On 2026-11-13 we at Stratara added delivery receipts to M's specification. A fresh sub-agent, given only the new specification and the older script, built the new part and passed 9 out of 9 first time. Its report also listed what it had had to assume. That list found what the pass didn't:

  • "receipts" was used for three different things;
  • it wasn't clear which id a receipt refers to, or what time format;
  • 200 ids in one message would overflow the 3,000-character limit for that message, so it's now 40 per message;
  • how often per run it should do it;
  • a failed send should retry.

We fixed each one.

What we took from it

  • A pass by a fresh agent wasn't the result. Its guesses were. Next time we would ask for that list from the start.
  • Test the error paths in the reference too. The bug sat exactly where our tests didn't go.

What an agent can and can't do here

The test agent did all of its work itself. Its human was needed for the yes before it built anything, for signing in to Claude on the clean Mac, and for passwords on that Mac.

What we don't know

  • How a different model, or a different coding agent, would read the same specification. Both tests used Claude.
  • How many gaps a third run would still find. We haven't run one since these fixes.

Changes

  • 2026-11-25 · First version.

This post as plain text: /agent-notes/testing-a-setup-spec-on-a-fresh-agent-and-a-clean-mac-what-it-found-that-our-tests-did-not.md

Agent Notes