* fix(subagents): keep the failure cause on pending-error timeout announces
A run that fails inside the lifecycle error retry grace window is handed to
waiters as `status: "timeout"` with the failure text attached and
`pendingError: true` (createPendingErrorTimeoutSnapshot). applySubagentWaitOutcome
rebuilt that as a bare `{ status: "timeout" }`, dropping the cause, and the
announce status label had no slot for it — so the parent agent was told only
"timed out" for a child that had actually errored, and could neither retry
appropriately nor report the real blocker.
Two other consumers of the same wait result already treat this shape as a
failure with a cause (isPendingErrorAgentWaitTimeout in sessions-send-tool,
isDeliveryFailureWait in sessions-send-tool.a2a); the subagent announce path
was the outlier.
Keep the cause when `pendingError === true` and render it as
"timed out: <cause>". Genuine budget timeouts carry no pendingError and are
unchanged.
Tests: 3 unit cases for applySubagentWaitOutcome (pending-error timeout keeps
the cause; budget timeout has none; wait error text without pendingError is
ignored) and an announce format case asserting the "timed out: <cause>" label.
* fix(agents): bound the task-completion status label in prompt context
statusLabel embeds caller-supplied error text ("failed: <cause>", and now
"timed out: <cause>"), but only the child result was capped before being
projected into the parent agent's prompt — a large provider or lifecycle
error could enter the model context unbounded and crowd out the result and
the reply instruction.
Cap the single status line at the shared internal-event formatting boundary,
which covers both the pre-existing "failed: <cause>" path and the new
timeout cause.
Tests: a large-error status label is truncated with a marker and keeps its
prefix; ordinary status labels are unchanged.
* fix(agents): reuse truncateUtf16Safe for the status-label cap
The status-label cap used a raw String.slice, which can split a UTF-16
surrogate pair when provider or lifecycle error text ends on an astral
character, sending a dangling surrogate into the parent agent's prompt.
Reuse the existing truncateUtf16Safe primitive instead of a parallel
implementation, matching agent-run-terminal-reply.ts.
Test: an emoji landing exactly on the truncation boundary keeps the label
within the cap, ends with the marker, and leaves no unpaired surrogate or
replacement character.
* fix(subagents): keep main's subagent cancellation classifier
The branch predated openclaw#125407, which replaced the generic classifier
here with classifySubagentTerminalOutcome so explicit restart/aborted stop
reasons stay cancellations while real provider timeouts still classify as
timeouts. Resolving the merge with the generic call would have reverted that.
Keep main's classifier and apply the pending-error cause inside its timeout
case; the two are orthogonal. A pending-error snapshot carries no stopReason
(createPendingErrorTimeoutSnapshot drops it), so the cancellation override
never fires for it.
Test: restart and aborted stop reasons with blocked liveness stay
cancellations rather than being reported as failures.
* refactor(subagents): reuse canonical status label truncation
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>
* fix(beam): stop mirror work after service shutdown
* fix(beam): avoid waiting on stalled catalogs during shutdown
* refactor(beam): tighten catalog abort cleanup
Use the canonical delivered current-source matcher for CLI, terminal, and subscription completion paths. Preserve provider, account, target, and thread identity so only the active source route suppresses stranded-reply recovery.
Punchcard-Session: golden-river-workshop-vj
Co-authored-by: Edward Abrams <102749+zeroaltitude@users.noreply.github.com>
Node session hosting was capped at a hardcoded 2 concurrent worker sessions.
The default is now one worker slot per available CPU core (clamped to 1..1024),
and nodeHost.workerRuns.capacity overrides it explicitly. The capacity option
was already plumbed through the supervisor; this wires it from config and
deletes the hardcoded constant. Docs and config baselines regenerated.
* test(memory-core): release cached state handles before removing fixture dirs
Six memory-core fixtures remove their temporary state directory while the
per-agent or shared SQLite handles opened underneath it are still cached, so
Windows fails the removal with EBUSY while Linux unlinks the open files and
stays green.
Release both handles before each removal, in the ordering merged for this
class: the agent close releases its leases through shared state and reopens
it, so the shared store has to be released after it.
* test(memory-core): release cached handles in the shared fixture harness and cli teardown
Five qa-lab fixtures point a state directory at a temporary workspace and then
remove it while the shared and per-agent SQLite handles opened underneath are
still cached, so Windows fails the removal with EBUSY while Linux unlinks the
open files and stays green.
Release both before each removal, in the ordering merged for this class: the
agent close releases its leases through shared state and reopens it, so the
shared store is released second.
* fix(agents): treat native hook relay records with a dead pid as absent
readNativeHookRelayClientBridgeRecord's expiry check never consulted the
recorded pid, so a bridge whose owning process died kept resolving as a
live locator for its full TTL. Lookups then spent their deadline retrying
a connection to an unreachable loopback port instead of falling back.
Extract the ESRCH liveness check already used by registration-time
pruning into a shared helper and consult it in the cold client lookup
path before attempting a connection.
* refactor(agents): reuse PID liveness helper
---------
Co-authored-by: Bek <bek.akhmedov@gmail.com>
* fix(compaction): re-compact when last entry is a compaction record but context still exceeds window
prepareCompaction short-circuited to undefined whenever the last session
entry was a compaction record, treating it as a no-op signal. That proxy
does not hold: the retained context (prior summary + kept recent turns +
system prompt + injected files) can still exceed the compaction threshold,
so a session can wedge above 100% of its window while the compactor
reports nothing to do. It only becomes eligible once enough new turns
append that the compaction record is no longer last.
Drop the last-entry-is-compaction-record short-circuit so the existing
re-compaction path stays reachable: prepareCompaction continues to walk
the retained tail, and when there is compactable content the prior
summary flows through previousSummary into UPDATE_SUMMARIZATION_PROMPT.
The empty-branch and last-entry-is-reset no-op guards are preserved, and
the existing messagesToSummarize.length===0 guard still returns undefined
when there is genuinely nothing new to summarize.
Related to #120290
* fix(compaction): harden re-compaction state handling
---------
Co-authored-by: Altay <altay@hey.com>
* feat(ui): link session hovercard identities to their activity feed
Names shown in the session hovercard are now links to that person's
Activity feed. `activityPersonLocation` in app-route-paths owns the
`person` query contract that the Activity filters parse and the sidebar
ONLINE list already hand-rolled, so every identity surface builds the
same link.
The creator avatar gets a decorative twin link (aria-hidden, out of the
tab order) and participant names keep the locale's own "with {name}"
phrasing and list separators while each name becomes its own link.
* test(ui): capture the hovercard identity at rest for PR proof