An app your AI built broke after the last change. How do you get it back?
You asked the agent for one more feature, published, and now the team's tool shows an error. How to tell what happened, when to roll back, when to restart, and why publishing again is usually the wrong first move.
The on-call handover tool your agent built has been running for a month. The engineering team uses it every morning: who is on call, what is still open, what the night shift left. Yesterday Alex asked the agent to add a priority field to each item, checked it locally, and published. This morning the page shows an error, and six people are waiting for the handover.
The instinct is to open the agent and say "it's broken, fix it". Sometimes that is right. More often, the first job is to get the team their tool back, and the second is to fix it. Those are different actions, and mixing them up is how a ten-minute problem becomes an afternoon.
We make Spryloom, which runs apps like this for teams behind sign-in, and the commands below are ours. The order of steps is the same on any host that keeps earlier versions.
First, find out which kind of broken
There are three different situations, and each has its own fix.
spry rollbackspry restartTwo commands tell you which one you have:
# running or STOPPED, and which version is live spry apps # what the app printed, newest last: 100 lines, up to 1,000 with --lines spry logs handover
spry apps asks the platform, not a record of what was last true. Only the app's owner and admins can read logs, because what an app prints can be the data it handles.
Look for the last thing the app printed before it went wrong: an error with a stack trace, a database complaint about a column, a request that failed. Lines marked [fly] were written by the platform, not your app, and they are often the answer. An app killed for running out of memory prints nothing about it itself; the platform's line is the only record.
If the new version has a bug: roll back
Rolling back puts the previous version's code back in place. It doesn't rebuild anything. The version that worked yesterday is still there, so it is the fastest way to give the team their tool back.
spry rollback handover
That returns to the version before the current one. To go to a particular one:
spry rollback handover --to 3
The broken version is replaced only once the earlier one is answering, so there is no gap while it happens. Then, with the team working again, fix the bug calmly: show the agent the lines from spry logs, let it fix the cause, test it locally, and publish again.
The one thing a rollback can't undo
Rolling back changes which code is running, nothing else. Your data is untouched, which is usually what you want: nobody loses the items they added this morning.
It also means a change the new version made to the database stays made. Alex's priority field probably added a column to a table. The old code doesn't know the column is there, which is normally harmless. But if the new version renamed a column, deleted one, or rewrote records, rolling back the code doesn't put them back, and the old code may now fail against the new shape.
So when the agent changes how data is stored, ask it to add things rather than rename or remove them, and keep your own export of anything you can't afford to lose before a change like that.
If the app stopped: restart
When spry apps says STOPPED, and the logs show a crash or a [fly] line about memory, start the version that is already there:
spry restart handover
It shows its stages like a publish, and the app comes back with the same code and the same data. If it stops again, the cause is still there. A common one is a query that loads a whole table at once, which works with 50 rows and runs out of memory at 50,000. That is a fix for the agent, with the log lines to go on.
Why not just publish again?
Publishing again feels like the safe, familiar action. To recover from a crash, it is the wrong one.
Publish again
- Same code, same app, plus a rebuild
- Reinstalls dependencies; a new release can swap one problem for another
- Builds, starts and checks the app
Restart or roll back
- Starts a version that is already built
- Nothing is reinstalled
- Faster
If the publish failed
A failed publish changes nothing. The new version isn't started until it is built, and the old one keeps serving until the new one is answering. The team still has yesterday's version. Read the failure message, which says what is wrong and what to do, fix the cause and publish again. spry check shows what Spryloom sees in the folder without changing anything.
If the publish seemed to stop part-way, because you closed the terminal or the connection dropped, it is probably still going: the work happens on Spryloom, not on your laptop. Check spry apps before publishing again.
Doing it from the agent
You don't have to type any of this. Spryloom gives the agent the same actions as tools, including logs, status and rollback, so "the handover app is broken, roll it back and tell me what the logs say" works in Claude Code or Codex. Its instructions tell it not to republish to recover from a crash.
The other options, fairly
Most hosting platforms keep earlier deployments and let you return to one, and some do it with a button. If yours does, the same order applies: look at the logs, go back to a version that worked, then fix. The other common approach is to revert the change in git and deploy again. That keeps a clean history and is how many engineering teams prefer to work, at the cost of a rebuild while the tool is down.
What it doesn't do
- It doesn't undo data changes. Rollback changes code only. Migrations and edited or deleted records stay as they are.
- It doesn't tell you a version is wrong. Spryloom checks that a new version starts and answers before switching to it. A version that answers with the wrong numbers looks healthy; that is for you and your team to notice.
- Logs are recent output, not a search tool. Up to 1,000 lines at a time, for the owner and admins.
- No alerts for errors inside the app. A page that shows an error comes from an app that is still answering. You hear about it from the people using it, or see it in the logs. Scheduled jobs are different: you are emailed when one is paused after failing 5 times in a row.
Start here
In Claude Code, add the plugin once:
/plugin marketplace add spryloom/claude-plugin
/plugin install spryloom@spryloom
Or from a terminal:
npx -y spryloom apps
npx -y spryloom logs <app>
npx -y spryloom rollback <app>
Before the next change to a tool people rely on, note which version is live in spry apps. That is the number you will pass to --to if you need it.