Skip to content

Report the session's worktree and borrow on the status wire - #745

Merged
alexeyzimarev merged 2 commits into
mainfrom
alexeyzimarev/ai-2320-desktop-shell-report-the-sessions-worktree-on-the-status
Sep 2, 2026
Merged

alexeyzimarev merged 2 commits into
mainfrom
alexeyzimarev/ai-2320-desktop-shell-report-the-sessions-worktree-on-the-status

Conversation

@alexeyzimarev

Copy link
Copy Markdown
Member

AI-2320 — no GitHub issue exists for this one; the Linear issue is the only tracker entry.

What & why

repo_path carried two conventions — a primary's repository, a borrowed reviewer's worktree — so the rail filed a reviewer one group away from the session it reviews, with nothing on the wire saying they share a checkout. Three trailing nullable members now say which is which: worktree_path, work_location, borrowed_from, and repo_path is the repository for every agent, resolved on the daemon. The rail keys worktree nodes on borrowed_from first, so a snapshot reviewer files under the checkout it reviews, and the header subtitle reads eventuous / agent-6da28a8cb8e94a · borrowed.

Where to look

AgentCheckout.Resolve is the one source of the three values. RepoLabel.Leaf drops the .claude/.capacitor tail guess; the consent prompt and activity log label a launch request's path, which carries no repository, so they show that checkout's own leaf.

Verification

  • Core 2583, App 1279, Daemon 2937 tests run. Remaining failures: one attach-client and one metrics test that pass when run alone, and the codex schema pin against the installed codex 0.152.1 (pinned 0.147.0).
  • dotnet publish -c Release: no IL2026/IL3050.

🤖 Generated with Claude Code

repo_path is resolved on the daemon from the worktree's source checkout, so a borrowed
reviewer and the primary whose worktree it borrowed report the same repository; the app's
own resolution serves only an older daemon. Consent-prompt and activity labels show a launch
request's own checkout leaf, since that wire carries no repository behind it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@linear-code

linear-code Bot commented Sep 2, 2026

Copy link
Copy Markdown

AI-2320

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-02T10:55:32.397377Z 3410dc7 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3410dc72a3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

.ThenBy(a => a.Id, StringComparer.Ordinal)
.Select(a => new AgentStatusDto(
a.Id, KindText(a.Kind), a.Vendor, a.RepoPath, a.Status,
a.Id, KindText(a.Kind), a.Vendor, a.Checkout.Repository, a.Status,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve repo_path semantics for older clients

When an older desktop client connects to this upgraded daemon, it ignores the new trailing checkout fields but still interprets repo_path as the session's checkout. Replacing it with Checkout.Repository therefore moves borrowed reviewers from their borrowed-worktree rail node into the main-checkout node; version skew is allowed when the user declines the takeover prompt. Preserve the existing repo_path meaning and add a separate repository field, or negotiate the semantic change before sending it.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping repo_path as the repository is the point of this change (AI-2320): the field carried two meanings, a primary's repository and a reviewer's borrowed checkout, and the new trailing members are what say which checkout is which. A second repository field would leave repo_path ambiguous for good.

Under version skew the effect on an older desktop app is not a regression. Before, it filed a primary under "main checkout" and its borrowed reviewer one group away under agent-…; against this daemon it files both under "main checkout", mislabeled but together. Tray, card and Home labels resolve to the repository name either way. The one degrade is the older app's chat relativizing tool paths against repo_path: for a reviewer borrowing a daemon worktree the older ToolDetail still strips the .capacitor/worktrees/<id>/ segment, so only a reviewer borrowing a .claude/worktrees checkout shows that prefix, and only until the app updates. Nothing in the CLI reads repo_path from this payload; the agent list and server registration use the instance's own path, which is unchanged.

CheckoutLabel picks the checkout a session is presented under, the one a reviewer borrowed
first, so the rail and the workspace subtitle cannot drift. The chat relativizes tool paths
against worktree_path, the checkout the agent runs in, which for a snapshot reviewer is its
private copy. Against an older daemon both fall back to RepoPath: the repository for a
primary, the borrowed checkout for a reviewer.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@alexeyzimarev
alexeyzimarev force-pushed the alexeyzimarev/ai-2320-desktop-shell-report-the-sessions-worktree-on-the-status branch from 4541a6b to 96a3103 Compare September 2, 2026 12:27
@alexeyzimarev
alexeyzimarev merged commit 91aec0e into main Sep 2, 2026
6 checks passed
@alexeyzimarev
alexeyzimarev deleted the alexeyzimarev/ai-2320-desktop-shell-report-the-sessions-worktree-on-the-status branch September 2, 2026 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant