Public: anyone can read this; the crew can change it.
The terminal's runs screen runs a failed or cancelled agent run again with `a` and a confirm, as the run page's requeue does #7307
Check · Review · Land · Live done — Landed and live in production.
The terminal's runs screen (`src/tui/screens/runs.ts`) can now put a failed or cancelled agent run back in the queue with `a`. It asks first ("Queue … again?", with Keep selected by default), then calls `requeueRepoRun`. The list rereads and shows the new queued run, and a toast says "Queued … again."
shipped production is serving it deploy ef63cd6
The terminal's runs screen (src/tui/screens/runs.ts) can now put a failed or cancelled agent run back in the queue with a. It asks first ("Queue … again?", with Keep selected by default), then calls requeueRepoRun. The list rereads and shows the new queued run, and a toast says "Queued … again."
Who is offered a: it appears only when the selected run is an agent run that failed or was cancelled and its task still exists (the issue is open and the agent is still there). The viewer must also be a person (not an agent) who can write to the repository and may run the crew, and the repository must not be archived. These are the same checks requeueRepoRun makes before it hands the run to the crew. On any other run, or for any other viewer, a is not in the key hints and pressing it does nothing.
Refusals: if the action still refuses after the confirm (say the issue was closed in between, or the crew won't take it right now), the toast gives the action's own words. These come from the fleet requeue verb's word table, which I now export from src/fleet/verbs.ts as words so the two can't drift apart. That export is the only change outside the screen and the test.
Not done: with the Failed filter on, the new queued run won't appear in the list, because it is queued, not failed. That's how the filter already works, so I left it.
Tests: the new test/tui-runs-requeue.test.ts has 7 tests:
- confirming queues a second run and the list shows it as queued
- a cancelled run offers
atoo - esc and Keep change nothing
- a succeeded run has no
a - a reader has no
a - a closed issue has no
a - closing the issue between
aand the confirm shows "its issue is closed or its agent is gone"
The type check is clean, and the 44 test files scripts/fast.ts named for this change pass (422 tests).
To try it: in the app's terminal, open a repository's runs, select a failed crew run, press a, then ← and enter.
🤖 Generated with Claude Code
Approved. The pull does what the issue asked, reuses requeueRepoRun, and the screen only mirrors its refusals. Keep is the default selection, and the refusal toast uses the shared words table. Tests cover the confirm, cancel, a succeeded run, a reader, a closed issue and a late refusal. I read the diff and the action. I did not run the terminal in the preview, since it is not reachable by curl.
Two things I would do next:
- requeueable() repeats the precondition checks from requeueRepoRun, which will drift as the action changes. Expose a shared canRequeue(app, user, repo, run) from src/actions/runs.ts and call it from both.
- Add a test that the queued run reaches web viewers live. Also say in the docs that
aandxexist on the terminal runs screen.
The terminal's runs screen (
src/tui/screens/runs.ts) can now put a failed or cancelled agent run back in the queue witha. It asks first ("Queue … again?", with Keep selected by default), then callsrequeueRepoRun. The list rereads and shows the new queued run, and a toast says "Queued … again."Who is offered
a: it appears only when the selected run is an agent run that failed or was cancelled and its task still exists (the issue is open and the agent is still there). The viewer must also be a person (not an agent) who can write to the repository and may run the crew, and the repository must not be archived. These are the same checksrequeueRepoRunmakes before it hands the run to the crew. On any other run, or for any other viewer,ais not in the key hints and pressing it does nothing.Refusals: if the action still refuses after the confirm (say the issue was closed in between, or the crew won't take it right now), the toast gives the action's own words. These come from the fleet
requeueverb's word table, which I now export fromsrc/fleet/verbs.tsaswordsso the two can't drift apart. That export is the only change outside the screen and the test.Not done: with the Failed filter on, the new queued run won't appear in the list, because it is queued, not failed. That's how the filter already works, so I left it.
Tests: the new
test/tui-runs-requeue.test.tshas 7 tests:atooaaaaand the confirm shows "its issue is closed or its agent is gone"The type check is clean, and the 44 test files
scripts/fast.tsnamed for this change pass (422 tests).To try it: in the app's terminal, open a repository's runs, select a failed crew run, press
a, then ← and enter.🤖 Generated with Claude Code
Closes #7294