Alchemist: Rescuing a Stuck Ticket
Fetch a stuck ticket's agent branch through the git proxy, fix it in Claude Code or Cursor, and land it into staging yourself.

Every ticket does its work on its own branch, agent/<the ticket's job id>, and only reaches staging once it lands. Most tickets land on their own. When one does not, a land step that could not complete, or a run you cancelled mid-way, the work is not lost. It sits on that branch. You can fetch it, finish it, and land it yourself.
This guide assumes you already have a git credential and a local clone. If you do not, start with Clone Your App’s Code and Develop Locally.
1. Find the branch name
Open the stuck ticket’s detail page. A ticket that could not land names its own branch in two places: the question it is waiting on you to answer, and the failure reason underneath it. Both read something like:
Implementation on branch agent/9f0114b6-fe05-4d41-8bf2-04962bc2ee94 looks
complete, but it was never landed. Approve a land continuation, or land it
manually and reply once it's merged.The branch is always agent/<job id>, the same job id shown in the ticket’s own detail URL.
2. Fetch it through the git proxy
The same git proxy that clones and pushes staging reaches every branch in the repository, not just the default one. From your existing clone:
git fetch origin
git branch -r | grep agent/origin/agent/9f0114b6-fe05-4d41-8bf2-04962bc2ee94Check out the one you need:
git checkout -b recovery agent/9f0114b6-fe05-4d41-8bf2-04962bc2ee94You are now on the exact state where the ticket stopped. git log --oneline -5 shows the commits the agent made before it parked.
3. Fix it, in Claude Code, Cursor, or anything else
Work in the checked-out branch the way you normally would. The repo’s own CLAUDE.md still applies, so an editor that reads project instructions picks up the same conventions the agent was following.
4. Land it into staging
Merge your branch into staging locally, then push through the proxy:
git fetch origin staging
git checkout staging
git merge origin/staging # picks up anything that landed since you last fetched
git merge recovery # brings in the fix
git push origin stagingPushing to staging deploys through the normal pipeline, the same as an agent’s own merge. If another merge is in progress, the proxy asks you to retry, safe to do immediately.
5. Close the ticket out
If the ticket is still waiting on a reply, answer it (from the ticket page, or reply_to_ticket over MCP) noting that you merged it yourself. That is the reply the question itself is asking for, and it is what moves the ticket out of “waiting.”
FAQ
Do I need special access to fetch an agent branch? No. The same project-scoped credential that clones and pushes staging reaches every branch, agent branches included.
What if I check out the wrong branch by mistake? Nothing happens until you push. Fetching and checking out is read-only.
Does this only work for stuck tickets? No, the proxy has no concept of “stuck.” This is simply the most common reason to reach for a branch other than staging.
Can two tickets be stuck on the same branch at once? No. Each ticket gets its own agent/<job id> branch, so recovering one never touches another’s work.
Next steps
For how a ticket’s branch and land step normally work, see Alchemist Tickets. For the full local development setup this guide builds on, see Clone Your App’s Code and Develop Locally.