The link works, but lands one step short
The apply and browser-task handoff notifications — raised when a run blocks on a captcha, a widget it cannot operate, or a value it refuses to invent — link to /board.
That URL is valid and resolves, so it is outside #344's scope (which was links that do not resolve at all). But /console/instances/:id/tasks/:taskId (RunDetail) is a declared route that holds the takeover overlay and the input box — the two controls that actually answer the handoff. And taskId is already in scope at both producer sites, so this is a link that could be more specific for free.
The pattern is worth naming: a notification that asks for help should land on the control that provides it. #344 established this for the Coder — it chose /console/instances/:id/coding/<sessionId> over the repo list specifically because "resolving a handoff is a /sessions/:id/message send, which only the session view offers." The same reasoning applies here, and the apply agent's handoffs are the platform's oldest human-in-the-loop path.
Three handoff reasons all route this way today (browserHandoff / browserHandoffStatus / browserResume):
- challenge — solve a captcha in the live takeover
- stuck — do one step the agent could not
- needs_input — supply a value the prompt forbids it to fabricate
For needs_input in particular, the board shows a card; the input box is on the run.
Do it through the guard, not around it
b09fabf (#344) made workers/api/src/lib/console-links.ts the only place under workers/api/src that may build a console link, enforced by a source scan and by tests that import the console's own route table (store/console/src/lib/routes.ts) rather than restating it. So this is: add a builder there, use it at both sites. The existing tests cover any new exported builder automatically — console-links.test.ts enumerates Object.entries(links).
Worth checking while you are there
Whether RunDetail handles a task that has since resolved. A user tapping a stale handoff notification should get the finished run, not an error — #344's session link degrades to the repo list on purpose, and this should degrade comparably.
Acceptance
Found by the agent that fixed #344, deliberately left out of scope.
The link works, but lands one step short
The apply and browser-task handoff notifications — raised when a run blocks on a captcha, a widget it cannot operate, or a value it refuses to invent — link to
/board.That URL is valid and resolves, so it is outside #344's scope (which was links that do not resolve at all). But
/console/instances/:id/tasks/:taskId(RunDetail) is a declared route that holds the takeover overlay and the input box — the two controls that actually answer the handoff. AndtaskIdis already in scope at both producer sites, so this is a link that could be more specific for free.The pattern is worth naming: a notification that asks for help should land on the control that provides it. #344 established this for the Coder — it chose
/console/instances/:id/coding/<sessionId>over the repo list specifically because "resolving a handoff is a/sessions/:id/messagesend, which only the session view offers." The same reasoning applies here, and the apply agent's handoffs are the platform's oldest human-in-the-loop path.Three handoff reasons all route this way today (
browserHandoff/browserHandoffStatus/browserResume):For
needs_inputin particular, the board shows a card; the input box is on the run.Do it through the guard, not around it
b09fabf(#344) madeworkers/api/src/lib/console-links.tsthe only place underworkers/api/srcthat may build a console link, enforced by a source scan and by tests that import the console's own route table (store/console/src/lib/routes.ts) rather than restating it. So this is: add a builder there, use it at both sites. The existing tests cover any new exported builder automatically —console-links.test.tsenumeratesObject.entries(links).Worth checking while you are there
Whether
RunDetailhandles a task that has since resolved. A user tapping a stale handoff notification should get the finished run, not an error — #344's session link degrades to the repo list on purpose, and this should degrade comparably.Acceptance
console-links.ts.Found by the agent that fixed #344, deliberately left out of scope.