Letting the Agent Loop Run: 30 Tickets, a Self-Kill and What the Gate Missed
In part 5 I spent a whole session planning TileTally without writing any of it: a spec, 48 Jira tickets with dependencies, and a script, loop.py, that hands those tickets one by one to a local model in opencode and owns everything the model isn’t trusted with. This part is what happened when I let it run.
The first ticket
I ran one ticket first, loop.py --max 1, to watch a full cycle before leaving it alone. The first ticket is the monorepo scaffold: pnpm workspace, TypeScript config, ESLint, Vitest, Playwright and an empty Vite app with the app’s name on it.
It picked the ticket up at 07:47 and Jira had it as Done at 08:00. The gate passed on the first attempt, so the retry path never ran. One commit, 28 files, with the subject and Refs: line exactly as the prompt asked. The local model didn’t push. The script did.
The decision log is the part I liked most. It wrote six entries for that one ticket, things like:
- It pinned the latest stable versions, which meant React 19 even though the spec says “18.3 or above”. That fits the spec’s wording, and it wrote the reasoning down.
- It noticed
vitestruns in watch mode in a terminal, which would have hung the gate forever, and switched the test script to run once. - WebKit couldn’t launch for Playwright on my machine (missing system libraries, no sudo), so it noted that as an environment problem and kept Chromium passing.
One entry was a shortcut. To keep lint trivially green, it told ESLint to ignore the src and test folders of the two empty packages. Honestly, I didn’t care. It picked speed over cleanup, and that was fine by me. The very next ticket, the core types, removed the ignores anyway, and those folders have been linted ever since.
Watching that first ticket close was a good validation. I’d thought this approach could work, but I’d never actually tried it. Seeing the whole workflow run on its own was exciting.
Unattended
Then I let it run. It worked through the board for about 16 and a half hours and closed 30 tickets, everything from the scaffold to the Android build. It stopped on its own when the only tickets left were the ones labelled for me (the iOS build needs a Mac) or the ones blocked behind them. Every ticket the loop could reach got done.
Only two tickets needed a second attempt. One was a broken file path in a test, which it fixed after the gate failed. The other one is worth telling. To clean up after a Gradle build it ran pkill -f gradle. That pattern also matched its own opencode process, because the command line contained the ticket text, and the ticket text mentioned ./gradlew. So it killed itself. The script saw exit code 143, sent the failure back, and on the retry the model worked out what had happened, stopped using broad kill patterns, and along the way found and fixed a test that was flaky before it ever touched it.
Not every hiccup was the loop’s doing. I was doing other work on the server while the loop ran, and that ate into the machine’s memory. Nothing was wrong with the server, it was just busy.
Here’s the whole project in commits per day. Teal is the loop building the app, and amber is the shipping stretch that started with the new name on the 23rd. On the first day, 29 of the 32 commits were the loop’s.

Coming back to 30 closed tickets felt great. Then I started testing what it had built, and logged a few follow-up tickets for the bugs I found.
The part the gate didn’t see
Every ticket was green by the loop’s standard. GitHub CI was not. It had been red on main for 8 tickets in a row, and nothing in the loop looked at it.
The loop’s gate runs install, lint, typecheck and unit tests. CI also runs the production build, end-to-end tests in Chromium and WebKit, the Docker image and the Android build. When I asked Claude to log a ticket and fix it, the failures came off in layers, each one hiding the next:
- the Android job used an action name that doesn’t exist
- a step ran
pnpmbefore pnpm was installed - the e2e preview server listened on IPv6 while Playwright checked
127.0.0.1, so it timed out before running a single test
Once those were fixed, the end-to-end tests finally ran on WebKit for the first time anywhere. WebKit can’t launch on my machine, so the local model had only ever run Chromium. And that’s where the real bug was. WebKit ignores aspect-ratio on a <table>, so the main grid collapsed into rows 1px tall and every tap landed on the wrong cell. In Safari, and in the iOS app once it ships, the core screen would have been unusable. Chromium was fine, so every check the loop could run said done.
The fix was a few lines of CSS plus some test changes. Claude reproduced WebKit in Playwright’s Docker image to get there. While doing it, it ran a pkill -f whose pattern matched its own shell and killed it. Same mistake the local model made, a few hours apart.
The lesson for planning: the gate is part of the spec. I planned the loop’s guardrails carefully and then gave it a smaller definition of “done” than CI had. Next time the gate should include a build and at least one browser’s end-to-end run, or the script should wait for CI on the pushed commit before closing a ticket.
Then iOS, on a Mac
The loop runs on Linux, and you can’t build an iOS app without Xcode. So the iOS tickets sat there with a needs-human label. They couldn’t wait, though. I wanted the iOS app out first, because my kids are used to iOS devices. Instead of doing them by hand, I moved the loop to my Mac for those tickets.
That took a few changes to the loop, made in a reviewed commit because the agent isn’t allowed to edit its own loop:
- a host flag, so the prompt tells the agent Xcode is there and iOS work is in scope
- an iOS step in the gate:
cap sync iosand anxcodebuildbuild for the Simulator - an extra Jira filter, so two loops can run at once without fighting over tickets

The Mac fought back in ways Linux never did. Each of these cost hours of loop time:
- macOS Local Network privacy. A process that’s been detached, under tmux or
nohup, gets no access to the LAN. opencode couldn’t reach the model server, whilecurlandpingfrom the same Mac worked fine, so the network looked healthy. The workaround is to run the loop inside an SSH session from the Linux box, kept open in tmux there. - opencode’s background service.
opencode runhands the work to a background service, and any opencode command starts one if none is running. Start it from a throwaway SSH command and it’s detached, so the point above applies. One ticket lost three one-hour attempts to that. - Old sessions come back. When that service starts, it resumes every unfinished session it knows about, including ones I’d killed. Five old runs came back at once and edited the checkout together. The real run saw their changes, took them for a human’s work in progress, and blocked itself.
opencode runwaits on stdin. Over SSH without-n, stdin never closes, andopencode runsits there forever without calling the model.ssh -nand</dev/nullfixed it.- BSD
pkill. On macOS, options after the pattern count as more patterns.pkill -f "opencode serve" -P 1kills every process of yours with a “1” in its command line. That’s the thirdpkillstory in this project. - One Jira timeout ends the loop. Picking the next ticket has no retry, and nothing restarts the loop.
And the gate came up short again. On iOS 27, an app without a scene manifest builds fine and crashes the moment it opens. Three tickets passed the gate that way, because the gate only built the app. The fix was a smoke test that launches the Release build on a fresh Simulator and fails on a crash or a blank screen. It now runs in CI, before every release, as the last step of the loop’s iOS gate, and in a pre-push hook on the Mac.
What I don’t love
- The gate only checks what it can check. Lint, types and tests pass or fail cleanly. “The app runs offline on the Android emulator” doesn’t. Twice now my gate checked less than reality did: WebKit on the web, and an app that built but didn’t launch on iOS.
- It stops on the first failure. The tickets are a chain, so skipping ahead makes no sense. But it means one bad ticket at 2am stalls everything till morning.
- Running a loop on a Mac is fiddly. Every item in the list above was found the hard way, with the loop sitting idle.
I didn’t write a single line of this app’s code, and I was still really content. I was designing, planning and orchestrating, so it felt like we did it, even though the LLM wrote the code. The real value was in the planning and in breaking the work into atomic changes.
Next up: shipping. The name change from TileTally to SevenRack, the things you can’t change after the first upload, and getting into the App Store.
Where this ended up
TileTally became SevenRack, a free word game scorekeeper for iPhone, iPad and Android. It’s in the App Store now. The launch post has the whole app in one place.