Stuck runs and why a run failed
Updated 2026-10-31
The platform watches every @plan, @build and @check turn while it runs. It doesn't ask the agent how it's doing: it looks at the tools it uses and applies fixed rules.
What counts as stuck
Legitimate waits don't count: sleep, gh run watch, an until … sleep or waiting for CI.
What happens when it gets stuck
- The run's thread gets a ⏳ saying which role and which command.
- The role is told what to check. It gets it as soon as the command returns, which is when it decides whether to wait for it again.
- From the second stuck pattern in the same run, whoever asked gets a push.
The same pattern isn't reported twice within 30 minutes. The platform never kills a command or stops the turn on its own.
Waiting costs nothing
If @check is only waiting for its preview (no free box, or it is still building), the run pauses: the card says "Waiting for preview" and no turns are spent. As soon as the preview is ready, @check reviews once on its own.
Dependabot: CI decides the small ones
- Patch and minor skip
@check: they merge on their own as soon as CI is green (with the room's automerge on). If CI goes red, you get a note in the thread. If the repo runs no CI within 30 minutes,@checkreviews it as before. - Major is reviewed by
@checkagainst how the repo actually uses it. If it only bumps development dependencies (types, linters, tests) or GitHub Actions, no preview is required: CI is the proof. If it touches what runs in production, the preview is still required.
Spend cap per run
Every run has a dollar cap (all roles together): $15 for runs and sprints and $5 for Dependabot, unless someone changed them. When it is reached the run stops: the role's next step is saved, the card says "Hit its spend cap" and the requester gets a notice. From there:
- Raise cap: the next step (+$5 up to $20, then double) or any amount you choose. The run resumes where it stopped.
- Cancel run: nothing more is spent. The PR is not closed automatically.
In the app, the run detail shows spend against the cap ("$3.20 of $5"), and the Factory "…" menu changes the space cap for runs and sprints (owner only; Dependabot never goes above it). Via API: GET|POST /api/v2/workspaces/{slug}/factory/budget and …/runs/{id}/act with {"action": "budget", "usd": 10}.
Why it failed
When a run closes, escalates or is cancelled without being healthy (stuck patterns, @build over 30 min, @check→@build loops, red CI), the thread gets a 🩺 with three lines: what happened, the critical step and what to change next time. A healthy run gets nothing. Time with the plan to approve, escalated, or with the PR to merge is a person's turn: it's reported apart ("waiting for a person") and never counts as slowness. If @check escalated because test variables or credentials are missing, the category is environment and the action says what to save in Credentials.
The full analysis, from the terminal:
Categories are fixed: approved_unmet_criterion (a criterion of the approved plan, like "in the preview", wasn't met and was approved or merged anyway; it comes before any stuck pattern and also makes a merged run unhealthy), environment, missing_service, dependencies, unresolved_build_or_tests, fixed_strategy, missing_verification, premature_stop, ambiguous_spec, ci. Actions say where the change goes: role_rules (a rule in ), repo_setup (something in the repo), skill or prompt.
In the thread, Arqui reads the same analysis with «@arqui what happened with #13?» and proposes the guardrails as «Ask» cards. With approved_unmet_criterion it does this on its own when the run closes, once. If the deploy fails after the merge, the analysis is redone.
To see times and stuck patterns step by step: ghosty factory runs show 13 --timing. See .