Ask: question a live run without interrupting it, and a nudge for a stuck run #223
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Builds on #222 (Repair).
Symptom
A person has no way to ask a question about a run without talking to its agent, and anything sent to the agent steers it. A run can also be stuck in a state nothing marks as failed (an agent that has gone quiet, a step waiting on something), where Repair never becomes available because the run has not failed.
Wanted
An Ask mode on the same helper as Repair: one agent, read-only while the run is live, full access once it is stopped or failed.
The Ask agent should have a setting that lets the user choose the backend, similar to planning. While any backend could work, one that only allows a single agent should disable the Ask agent. I'm actually thinking the Ask agent could be a good fit for the free backend, possibly paired with a fast reliable agent that would be useful for checking status, digging through transcripts, and knowing the braid infrastructure well. Perhaps it could always be "warm", meaning it is an always-on agent paying attention to the runs and their status/progress.
Shipped in PR #421 (
ff9381d8), changeask-mode.askagent (read-only by its permissions: no edit, write, patch, shell, subagent, webfetch, browser,apporrepair) or asrepair. Ask's first message carries the run, the step it is on and the agent's last words; the first message to Repair after a stop says the conversation turned.POST /api/runs/{id}/repairaccepts a live run and recordsagentonhuman.repair; a succeeded or archived run is still refused.Aswitches), Agent by default; in Ask mode it has its own colour and the placeholder "Ask about this run", offers Send alone, and sends to the helper, never the step's agent. The choice is remembered per run.Tests:
tests/api/test_ask.py,tests/agent/test_review_agent.py,ui/src/lib/ask.test.ts, journeys inui/e2e/ask.spec.ts. Not yet done on a real run: a question to Ask during a live step on production. Ask uses Repair's backend setting, as proposed.Follow-up fix in PR #423 (
2273743e). The first Ask on production (run 182, during apply) was accepted by the route and refused by the delivery with "this run is running; Repair is for a stopped or failed run": the supervisor'sopen_repairran the Repair check again without Ask's allowance. It now opens the live run's own server for Ask and holds nothing for it. The first prompt's running-step facts also read columns the step table does not have; fixed, with a test against the real schema. The run was stopped and resumed to deploy it.