Keeps the findings ledger, extra visits and on_exhausted=decide alongside the
run budget, failure classes, quota parking and error-loop backoff.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A stage refused for a Claude usage limit no longer fails its run: the
runner tries the chats' Claude account auto-switch (per-home setting) and
reruns the visit, else parks the run in the new waiting_quota status
(persisted, with reset/resume time in run summaries, details and events)
and resumes the same visit at reset + 1 min, also after a restart.
resume_run / `pipelines resume` resumes now; cancel works on parked runs.
The rerun visit gets a "# Previous attempt" interruption note. Subscription
limits no longer say "top up the provider account".
- run/retry into an account known to be limited are deferred (quota_policy
defer/refuse/now; CLI refuses under --json/--yes unless --defer or --now).
- failure_class on runs (quota, loop_exhausted, timeout, permission_denied,
harness_error, blocked, environment, canceled, interrupted, budget,
check_failed, other) in RunSummary/RunDetail/events, CLI inspect/runs/wait/
stats and the app failure line.
- Claude permission denials (permission_denials / refused tool results) fail
a blocked visit with permission_denied naming the tool use.
- Harness failures are classified transient vs deterministic; deterministic
ones (and a repeated empty readback) skip error self-loops; transient
self-loops back off 15 s, 1 min, 4 min.
- Whole-run USD budget: run --budget, server default (run-budget /
get/set_run_settings); 80% warning notification, stop with class budget.
- App: waiting_quota status/filter with resume time, Resume now and Cancel,
failure class wording. Docs and skill references updated.
Merges main (check stage, delivery gate, Claude stage restart survival,
schedule changes).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep both intents: check stages, allow_workspace_changes, outcome repair
counts and Claude stage re-adoption from main beside the findings gate,
resume_session, applyLimitOn and exhaustion decisions.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Runner-owned findings ledger per run: stages report a # findings section
(new items and F<n> status changes); stable IDs, persisted (run_loop_state),
in RunDetail.findings, findings.md, memory.md, inspect.
- type=findings gate stage routes open/clear on the ledger mechanically.
- retry --extra-visits N [--stage KEY] continues an exhausted loop; limits
on_exhausted=decide parks the run on accept/continue/abort.
- Essential memory cap 20 KB, task never truncated, handoff and open findings
ahead of the outcome ledger.
- Lint rejects limits.on outcomes on forward edges; warns on ineffective
limits and resume_session.
- A resumed retry carries the failed visit's output.md and private/ under
previous-attempt/.
- resume_session=true resumes a Claude stage's previous session on loop visits.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Claude stage CLIs now run in their own session (setsid) with the prompt from
a file and stream-json written straight to cli-<n>.out in the evidence
directory; owner.json records pid/pgid, session, invocation and output. A
server shutdown leaves the CLI running and owned (ErrDetached). Start-up
recovery re-adopts it (stage.ClaudeStageReattachable): the next process
re-reads the output, follows the live CLI until it exits, or reads the
result it left while the server was down; one that ended without a result
marks the run interrupted with a clear reason. The outcome repair follow-up
is re-adopted too (or asked again if its CLI died without a reply).
- Workspace overlap: two folders outside any repository overlap only when
they are the same folder or the inner one lies within the outer run's
declared write paths; nested-repository rules are unchanged.
- Scheduled admissions refused for a busy workspace are recorded as
"delayed" and retried every 5 min for up to 2 h (env-configurable), then
started or skipped with the reason; the operator gets a low-priority app
notice (and ntfy when enabled) when a scheduled run is delayed or skipped.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- New `type=check` stage: the server runs a `commands` block (sh -c, per
command_timeout, workspace env) and routes on pass/fail; per-command status,
exit code, duration and bounded output are recorded and the failing output is
the handoff. With delivery=true it is the landing gate (commit leftovers,
merge moved main, checks in a fresh candidate worktree, fast-forward main).
Parser/registry, lint (silent guards), format docs, CLI inspect, app graph and
run detail rendering.
- delivery=true is accepted on every harness (and on check stages).
- permissions.shell on claude stages maps to Bash(cmd) / Bash(prefix:*) rules
instead of a bare Bash allow; stages without edit that change the workspace
fail the visit with the changed files listed (allow_workspace_changes=true
opts out; artifacts, public and harness state dirs are ignored).
- File-change capture: symlinks compared by target, untouched protected files no
longer make captures partial, untracked caches/dependency/build output left
out, lockfiles listed without patch, huge files compared by metadata, raised
patch/line limits. Outcome repair follow-ups are logged and counted on the
step (control.outcome_repairs).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolve chat_room.go: keep main's bounded chatSub queue (ready channel, no ch) in attachSub; the subscribe live-turn marker is still queued at attach under h.mu through enqueueChatLocked, and an existing subscriber whose queue is full is overflowed (resync) after the hub lock is released.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merging the reliability branch added another utf16Len; 66a12207 also
records the merge of worktree-agent-a588aaf81441341cd.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TestChatFanoutToSeveralClients flaked (tablet frame 0 = step, want text):
chat_subscribe decided whether to replay a `step started` marker only after
writing its reply and attaching the stream, then sent it. A turn another
client started in between was already being fanned out live to the new
subscriber, so the marker arrived after that turn's user frame, and could
even arrive after its `step ended`, leaving the client showing a turn that
had finished. The marker is now decided and queued in the same critical
section that makes the client a fan-out target, and the new subscriber's
writer starts only after the subscribe reply is written, so the reply comes
first and the marker precedes every live frame of the turn it stands for.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Run worktree creation happens outside r.mu; the source tree is protected
from storage maintenance meanwhile and the reservation is re-checked under
the lock before the run is recorded (a refused tree is discarded).
- getRun/listRuns read the store without r.mu; listRuns finds failed runs
with an active cleanup agent in one query (partial index) instead of a
detail read per failed run.
- finishRunState writes the deliverable and walks the run size without the
lock; FinishRun retries transient failures with backoff (a refused
transition is final).
- Launch teardown retries a failed read with backoff instead of keeping the
reservation forever; a kept run that cannot be read at reattach is retried
and then marked interrupted (stopping its adopted session first).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A find bar over the transcript: query, Match case, n of N (counted from
the newest), Enter for an older match and Shift+Enter for a newer one.
Matches are painted over the rendered text, code blocks included, without
restyling it; the current match is scrolled into view. Matches in history
not loaded yet come from the server's chat:<id>-scoped search and are
reached by loading older pages. Esc closes and returns to the composer.
The key is the pane's, so a focused terminal keeps Ctrl+F. Fixture answers
scoped searches for captures; cheatsheet lists the key. The scoped search
matches the query as typed, spaces included, like the client.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A chat subscriber whose queue fills is detached and its writer ends the
stream with a resync frame (the app re-attaches and re-reads history); a run
subscriber gets a final runs_resync and the app subscribes again and
re-reads the Runs list and open detail. Consecutive text/reasoning deltas of
one part are joined in a chat subscriber's queue; joined numbered frames carry
seq_from and delta_lens so the app trims exactly the prefix a history page
already holds.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A schedule that cannot be parsed or claimed is logged and skipped instead
of aborting the tick for every schedule. Claimed runs are admitted on their
own goroutines, so a slow start (worktree creation) no longer makes the
next due schedule look missed; lateness is measured at claim time. An
invalid interval no longer divides by zero.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
operator_sessions gains a revision bumped by a trigger on every update; the
wire row carries it, and the app ignores a push (or a list read) older than
the row it holds.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The host counted any tool_result containing "running in background with ID"
as a launch acknowledgement, so a subagent's foreground `sed` of
fake-claude.py (or translate.go) became a background task that never ends.
A subagent's background command whose completion notification preceded its
launch result was also revived. Both stayed "Running" in the chat for days.
- claudehost: only a Bash/Agent/Task call's own first-line acknowledgement
starts a task; finished ids are never revived by late acks/progress;
background_tasks_changed (the CLI's running set) ends unlisted tasks;
tool output no longer counts as a task notification.
- claude: same strict acknowledgement; background_tasks_changed settles
tracked tasks; on reattach, host tasks without a native id are checked
against the main and subagent transcripts, so phantoms from hosts still
running the old build disappear.
- Fake CLI "subagent" turn and regression tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Without a terminal, run behaves as --json, tui refuses and confirmations
fail fast naming --yes instead of prompting.
- inspect prints a compact summary by default; --step N, --transcripts and
--json give detail.
- wait names a failed run's stage and first diagnostic line, prints how to
answer a run waiting on a person, and exits 2 when any run failed,
was canceled or interrupted (1 stays for client errors).
- help describes the current # outcome / # handoff format.
- Task starter's Land stage drops edit to match format.md; skill docs
document run --json --yes, retry --yes --json and the new behaviour.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Chat phone pushes (attention items, auto-switch notices) go through a
durable chat_notifications outbox with leases, bounded attempts and
backoff, retried by a worker; pushes cleared in the app first are never
published, and a publication racing a clear is cleared again.
- Queued/scheduled chat prompts are deleted on recovery only when they can
never be rebuilt; transient failures keep the rows and retry with backoff.
- Unattended chats with live work always keep notifying; the idle cap rises
from 16 to 64.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A kind=chat search with scope chat:<id> returns one hit per text-part
occurrence (message id, part, UTF-16 offset/length), newest message first,
paged by cursor (a reply's next_cursor or a chat_messages next_cursor), with
optional case-sensitive matching. Scoped and global chat searches no longer
cancel each other on one connection.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- turn.RenderPreviousAttempt: bounded "# Previous attempt" section (attempt
number, failing stage, bounded diagnostic, partial-edits note).
- In-stage retries (stage/model_run.go) append it instead of resending an
identical prompt; run retries (resume and restart) add it to the first
model visit's input.md, numbering attempts along the retry chain.
- --input-file retry overrides render only the override keys in input.md,
labelled "# Operator correction" (the step row keeps the merged input).
- Essential memory (memory.md) inlines a revisiting stage's own last handoff,
bounded, besides the previous stage's handoff.
- Interrupted runs can be retried: resume reruns the interrupted visit, or
starts the next stage after the last completed visit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TestAutoSwitchReplacesTheAutoContinue flaked because a usage refusal (delivered
on its own goroutine) was acted on while start-up recovery was still running.
resumeQueued read the durable auto-continue row, the server's account switch
then removed it, and resumeQueued put it back into the room; as the queue head
scheduled an hour out it held the switch's continue prompt behind it. The
refusal handler (and the schedule_followup tool) now wait for the same
recovery gate chat_* requests already wait for, and the refusal watcher is
registered only once the hub is fully wired.
TestChatShellShareQueuesAnOrdinaryPrompt flaked because the turn runner writes
the sender's reply straight to its connection while the echoed user turn goes
through the subscription writer, so the reply can arrive first and the test
discarded it while reading for the echo. The test now accepts either order.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- schedule_followup returns the follow-up id and lists pending follow-ups;
count-then-queue is serialised so the 3-pending bound holds under
concurrent calls.
- cancel_followup {id} removes one of the chat's undelivered follow-ups.
- schedule_followup {run_id, on: finished|attention} queues a durable
follow-up (7-day deadline) that is released with the run's state when the
run ends or waits on a human; run must exist and not already meet the
condition; watches are re-armed from the restored queue after a restart.
- show_html results warn about scripts, remote resources (blocked by the
sandbox) and missing dark-mode support.
- The ambiguous-call error advice fits each tool instead of always
suggesting a different title.
- references/chat.md and the SKILL.md chat paragraph document the above, and
questions are no longer described as Claude-only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Start-up recovery used to fail the whole runner when any previously active
stage session could not be confirmed stopped. That run alone is now marked
interrupted with a diagnostic naming the session and error. A Pi owner whose
process and process group are gone counts as stopped without its quiescence
receipt (it crashed), as the Claude stage path already did.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
emit now waits (bounded) for a full watcher to accept step and resync
frames instead of dropping them. The turn runner also ends its turn once a
harness that tracks its turn state has reported idle for the settle period
and its probe confirms, asking clients to resync.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- New chat: a cleared Name creates the chat without an operator title; the
list shows the harness's own title, or the default name until it has one.
The server no longer records "New chat" for a blank title and OpenCode
is created without a title so it names the session itself.
- New chat harness defaults to the one last used in the chosen folder,
else anywhere, else OpenCode; remembered on the device per server.
- Markdown tables wrap at word boundaries and never go below a column's
longest word (tokens over ~40 characters may break); a table whose words
cannot fit scrolls sideways with the code block affordance.
- Composer: right-click, long-press, Shift+F10 or the context menu key on
Send opens Send later... (30 min, 1 h, tomorrow 9:00, usage reset, pick a
time), sent through the same path with send_at.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
show_html documents that declare dark support follow the app theme; others
stay light. Tool description and skill docs say so.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When Claude Code refuses an operator chat's turn for a usage limit and the
server does not continue it on another account, the server now queues a
durable prompt (auto-continue-<refusal id>, sent as Pipelines (automatic))
for a minute after the reset: the refused operator message when the turn
did no work, else "continue". The reset comes from the refusal's text,
else the rejected rate_limit_event. Refusals of turns Claude Code started
itself are handled too, with no client attached; a restarted server or a
device scheduling the same refusal adds nothing. The choice is kept per
Claude home beside auto-switch (or by the server for chats without one),
read and set with chat_auto_continue, on by default.
The app's limit banner now finds the refusal as the latest turn, ignoring
notices, agent reports and activity rows after it, reads and writes the
server's choice, and only schedules its own prompt for older servers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Server: chat ntfy messages carry a sequence id derived from their app id;
clearing a chat app notification also clears it in ntfy (PUT
/<topic>/<seq>/clear, verified on ntfy v2.38.1).
- Server: a turn that sent an agent notify does not also send chat_reply.
- notify tool and MCP instructions: Pipelines already notifies at reply end
and for questions/approvals; notify is for mid-turn or background news.
- Shown notify items carry channels (apps/phone); the transcript row says
where it went.
- App: NotificationBridge.close(tag); web closes tracked Notifications and
tells other tabs over a BroadcastChannel; native bridge cancels by tag and
now supports macOS. AgentNotices closes on notifications_cleared and on
resubscribe cleared ids, and a tap sends clear_notifications.
- Docs: skill, chat reference, ntfy/notifications docs, app note.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The notify tool now records a chat_notify app notification with its own
id per call (no dedupe of repeated words) and the tool's priority, so
every subscribed client gets it and a reconnecting client replays it.
ntfy delivery is unchanged; the tool result names where it went.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ntfy uses the link only beside a web run view; otherwise it keeps the
run click and the receipt says why (app click stays the link).
- The outbox retry of a hook's failed publication re-resolves the stage's
link=, so the ntfy and app tap targets keep it.
- A valid link file is never the attached artifact.
- Notification artifacts are read through os.OpenRoot with O_NOFOLLOW.
- The link note is recorded once, on the first receipt, and never becomes
the run-level failure reason.
- Android: a recents relaunch does not reopen the link, and a run thread of
several entries opens the run rather than the latest external page.
- Docs and the protocol comment say "first non-empty line".
A stage's notify block may name `link=<pattern>` (validated like `open=`).
When the hook fires, the newest public/ match is read (at most 4 KiB); its
first non-empty line, if an absolute http(s) URL ntfy accepts as a click,
becomes the ntfy Click and the app notification click, with the run kept
as the app's run action and ntfy's browser view. A missing file or invalid
URL keeps today's tap target and is noted on the receipt diagnostic.
Android opens such an http(s) click in the browser (after clearing the
notification) instead of handing it to Flutter as a route.
A prompt queued behind a scheduled prompt (the app's auto-continue at a
usage limit's reset) stayed queued after that head was removed: unqueue
never woke the runner, which slept until the removed prompt's send_at.
unqueue now wakes it, and the runner re-checks a scheduled head at least
every 30 s.
Safety net: a due prompt held by a turn the room only observed (its end
lost, or a reattach watcher that gave up) is delivered once the harness
reports itself idle for a settle period and its probe confirms it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Claude account dialog shows 'Auto-switch account when usage runs out'
(claude_account_auto_switch) when the server reports it. The usage-limit
banner schedules no auto-continue while the server's auto-switch continue
prompt is queued. A chat refused after another chat already switched the
Claude home gets a fresh switch stamp, so its banner clears too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When Claude Code refuses an operator chat's turn for a usage limit, the
server marks the refused account until its reset and, if the chat's Claude
home allows it (claude_account_auto_switch / `pipelines claude-account auto
on|off`, on by default, kept in pipelines-accounts/settings.json), switches
the home to the saved account with the most usage left through the
claude_account_use path. Switches of one home are serialized, so chats
refused together switch once. Each refused chat gets one queued prompt,
marked as sent automatically, that asks the agent to check it is on track
before continuing; the app's auto-continue-at-reset prompt for the refusal is
removed (and refused if it arrives later), and the operator gets a
low-priority notification.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
usage.account now carries the email and organization of the account
Claude Code is signed in to (from its initialize account, or the saved
account just switched to), sent at process start and after a switch.
The app shows it as the send tooltip's usage prefix, the Claude account
menu subtitle, the usage-limit banner's status line and the info sheet.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>