fix(coding-agent): list client-owned workers - #1323
Open
veerareddyvishal144 wants to merge 1 commit into
Open
Conversation
Signed-off-by: vishal veerareddy <vishalveera.reddy@servicenow.com>
jonaowen
suggested changes
Aug 13, 2026
jonaowen
left a comment
There was a problem hiding this comment.
The list-path direction is right, but this needs two changes before merge.
- Do not add raw
ownerClientIdto the publicSessionSummaryreturned to every daemon client. The UI only needs an ownership classification (attached/resident), not the internal client capability/identity. Expose a boolean or narrow enum computed by the supervisor. This is also a daemon response-shape change: update the protocol/schema compatibility contract and old/new peer tests per repository doctrine, or place it behind an existing negotiated shape that is demonstrably compatible. - The added test constructs summaries and exercises only table formatting. It does not prove
handleListincludes a worker owned by a different client while attach/selection remains filtered, nor thatbusyClientOwnedSessionCountand stop safety remain accurate. Add a supervisor/daemon behavioral regression with owned and unowned workers and two client identities.
Please also remove or redefine the now-dead includeClientOwned request semantics rather than silently accepting and ignoring it; retaining a flag with behavior different from its negotiated contract is misleading.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fix
prime-agent listunder-reporting live workers that are owned by another CLI client.The supervisor previously filtered the list response through
isVisibleWorker(), which intentionally excludes client-owned workers for attach/selection semantics. Becauseprime-agent listuses a fresh daemon connection, it could not see those workers and incorrectly printedNo active agents.even while they were running.This change keeps
isVisibleWorker()unchanged and fixes only the list path:ownercolumn to the CLI table (attachedfor client-owned workers)Validation
npx vitest run packages/coding-agent/test/daemon-list-format.test.tsnpx tsgo --noEmitnpx biome check --write --error-on-warnings .git diff --checkFixes #1215
Note
Fix daemon list command to include client-owned worker sessions
DaemonSupervisor.handleListnow returns all workers regardless of ownership, removing the previous filter that excluded client-owned sessions from other clients.publicSummaryis extended to includeownerClientIdon each session summary when set on the worker descriptor.ownercolumn that displaysattachedfor client-owned sessions and is empty for resident sessions.Macroscope summarized f97d00a.