You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Agent message cards keep their sender's agent icon when the agent can't be found - #36653
A coordinator chat can show a "Started worker" card with "?" and no status dot while the sidebar shows that same worker's agent icon and live status. The same issue affects "Update from worker", "Task from coordinator" and "Message from coordinator" cards.
Messages saved the sender's name, but their icons depended on finding a live agent. A missing status row, closed terminal, restart or worker on another host could leave the card with nothing to draw.
What changes for users
New cards retain the sender's agent icon when the agent is known, even if the live agent cannot be found. A live agent row still supplies the current icon and status. Cards written before this build keep their existing behavior.
How
Worker-start, mail, task and coordinator writers save the sender's agent beside its name. The current chat provider or qualified terminal agent takes priority; an exact worker association can supply its saved launch information when live state is gone.
A remote worker's reported agent is retained in its existing saved launch information. Later updates and completion cards can use it after restart, independently of whether a Started-worker card was published. The user's launcher command, requested model and effort, and follow-up launch choices remain intact.
Name and icon share one sender observation. A chat's committed /clear lineage is traversed once per snapshot; worker fallback uses indexed identity lookups.
The saved field is optional and bounded. Future agent kinds survive with the existing letter-icon fallback; malformed metadata is ignored without losing the sender or failing launch or message delivery. Saved agent kind never creates a live status dot.
Plan
This is the first of two independently useful changes:
This PR saves known agent kinds on every sender and uses them when live identity is unavailable.
Durable worker identity supplies each message's saved sender presentation: adopted.
Intended: known remote agent kinds remain available without a visible remote row, and bounded future kinds survive independently updated clients and servers.
Intended: saved kind supplies an icon only; current status comes from the live row. Older cards are not backfilled when their agent was never saved.
Intended downgrade behavior: after downgrading to an older Orca, a chat that received one of these new cards shows that it was written by a newer version and opens again after updating; nothing is lost. This follows the journal's existing preservation behavior and the policy that saved data does not require downgrade compatibility by default.
Real CLI → RPC → production writers → journal and queue for worker start, saved tasks, dispatch and ordinary mail, with distinct Claude coordinator and Codex worker identities.
Configured remote launchers, unchanged command/preferences, and new status/completion mail after reopening the actual home database; absent, pending and failed Started-worker publication.
Failed, unknown, foreign, older, malformed and future launch metadata; isolated metadata read/write failures preserve the user's action and prior information.
Held local worker completion delivered after terminal loss through the legitimate journal wake, with marking only after acceptance and live-agent precedence retained.
Sender/storage round-trip and salvage for start, message and queued bodies; legacy and saved card icons, unchanged mobile/queue/copy/open behavior, and no saved status dot.
N/10N operation-count contracts for one fresh lineage walk and indexed worker lookups without population or history scans.
…'t be found
A card names its sender by a snapshot written with the message, but drew the
icon only from a live lookup, so a sender the lookup missed (a worker on
another host, a terminal after restart, a closed agent) showed "?". Every
writer (worker start, mail, task, federated start) now saves the sender's
agent kind beside its name, and the card draws it when no live row names
the agent. Live rows stay the source of icon and status whenever they match.
Review was skipped as selected files did not have any reviewable changes.
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 68a267ba-16e4-48ae-9613-bac82a7aaafb
Commits
Reviewing files that changed from the base of the PR and between a426d68 and 1a93505.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
Walkthrough
Sender metadata now includes an optional agent value alongside the sender name. Runtime resolution derives both values from one observation and can use persisted worker launch options when live agent data is unavailable. Orchestration task and mailbox delivery pass sender snapshots. Worker-start paths record launch agent data, and native chat falls back to saved sender metadata when live status is absent. Tests cover persistence, delivery, worker-start cases, and rendering.
Merge Risk: Low · previous review a426d
A small set of worker messages can show an incorrect agent icon, but delivery and launch behavior remain intact; the change is otherwise low risk.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 37.04% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Title check
The title clearly and concisely describes the main change: preserving sender agent icons when live agent lookup fails.
Description check
The description explains the problem, user-visible behavior, implementation, rationale, linked follow-up issue, and extensive test coverage. It is mostly complete, although it does not use every templ…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Description check
Explanation
The description explains the problem, user-visible behavior, implementation, rationale, linked follow-up issue, and extensive test coverage. It is mostly complete, although it does not use every template heading or include the checklist fields explicitly.
Full details: Docstring Coverage
Explanation
Docstring coverage is 37.04% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 27 functions across 37 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches
Generate docstrings
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Exercise malformed launch metadata through message delivery.
The malformed-federated case returns after checking worker start success. It does not call worker-show, so the configured federationPull fixture and its sender assertions remain untested for malformed metadata. Add the same subsequent delivery flow and assert that the pulled message retains the saved sender name and agent.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.
Worker cards could show “?” after their live agent row disappeared because messages saved the sender's name without its agent kind. New start, task and message cards now retain a known sender icon. A live row still supplies current identity and status; saved metadata never creates a status dot.
The review fixed configured remote launchers losing their known agent on later mail, held completion messages losing it after terminal exit, malformed optional launch receipts failing a successful action, and duplicate lineage reads. The user's command, requested model/effort and follow-up choices are preserved. Three review rounds, the design ruling, fresh architecture/performance checks and final readiness/reference comparison are complete. One subsequent CI repair only combined duplicate test imports; its independent review confirmed unchanged production and assertions.
Temporary follow-up: the card's live identity/status/label lookup remains in #36660, tracked in STA-13124. Older cards without saved agent information retain their existing behavior. Intended downgrade behavior: an older Orca preserves a chat with new sender fields but reports that it needs a newer version; updating opens it again without data loss. Known remote metadata and bounded future agent kinds are intended adaptations for independently updated hosts; saved icon-only fallback is also intended.
Verification:current-head CI passed, including static analysis/typecheck, all 12 test shards, packaging, mobile verification and cross-version wire compatibility. Focused execution covered 12 named files / 158 tests, followed by affected helper/fixture checks (3 files / 63 tests), test-pruning checks (4 files / 77 tests and the final 40-test resolver suite), and the import-only repair's 5 CLI contracts. Coverage includes actual CLI → RPC → production writers → journal/queue fixtures with distinct Claude coordinator and Codex worker identities; reopen, held completion, malformed/future metadata, renderer precedence and N/10N operation bounds. These are integration fixtures, not real provider executions. The QA table classifies these changes as tests-only: no app run or screenshot was required because icon geometry, layout, copy and interaction are unchanged.
QA evidence is retained at 33bc763973bd9dd3239bf9901562dffb86179344. The subsequent clean main merge ce8fffdda3c0105b5d5fc428f0cd80801c4916a2 received a narrow independent review; c27de2a3a171b4047ff65fdd33518ff14f1b65f2 changes test imports only. All 18 PR production files remain identical to the reviewed production commit. A second clean main merge a62d7f4c771 brought in #30955, whose three new receiving-account tests used the renamed sender resolver; fe50fad6beb942a57878d90c4ba2a7b3d6119790 updates only those three test call sites (senderName → senderSnapshot), and the seven affected files (88 tests) pass. A third clean main merge, 30b1176d04bd544ddb2ed25a5f3b43a707eeb3aa, resolved a test-only conflict in journal-storage-admission.test.ts by keeping both sides' new tests (12 tests pass).
The reason will be displayed to describe this comment to others. Learn more.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
⚠️ Outside diff range comments (1)
Minor · Resolve the sender snapshot for each reported dispatch. · structured-mail-source.ts:27-44
src/main/runtime/orchestration/structured-mail-source.ts:27-44 Minor · Functional Correctness · Quick win
Resolve the sender snapshot for each reported dispatch.
When one structured-mail group contains valid worker_done reports for different dispatches, group.find(...) supplies the first dispatch to the single sender shared by the group. This makes later cards use the first dispatch's saved agent icon when live identity is unavailable. Resolve the sender per message, or include the valid dispatch ID in the grouping key so messages with different reports receive distinct snapshots.
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 25f49c56-faab-4971-ad38-ad9c387b3b0e
Commits
Reviewing files that changed from the base of the PR and between 30b1176 and a426d68.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
…cap (#36875)
#36653 added five lines to federated-worker-start.ts, which was already
near the 300-line cap, so main's Lint step fails (305 lines) and every
PR based on main fails static analysis.
Recording a ready remote dispatch's resources and its input-accepted
stage moves, unchanged, into federated-worker-ready-record.ts.
Resolve conflicts with the session-module reorganization and with the
worker-start card's launched-agent fallback (#36653): the handoff card
uses the same fallback, keeping the launched agent's kind when the
sender lookup can't find it.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A coordinator chat can show a "Started worker" card with "?" and no status dot while the sidebar shows that same worker's agent icon and live status. The same issue affects "Update from worker", "Task from coordinator" and "Message from coordinator" cards.
Messages saved the sender's name, but their icons depended on finding a live agent. A missing status row, closed terminal, restart or worker on another host could leave the card with nothing to draw.
What changes for users
New cards retain the sender's agent icon when the agent is known, even if the live agent cannot be found. A live agent row still supplies the current icon and status. Cards written before this build keep their existing behavior.
How
/clearlineage is traversed once per snapshot; worker fallback uses indexed identity lookups.Plan
This is the first of two independently useful changes:
/clear, worker reopening and across hosts.Differences from the common pattern:
Tests