镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

WAITING FOR WILL'S AGENT WORK/Give agents a current teammate roster for collaboration - #1307

Open
morgmart wants to merge 2 commits into
mainfrom
morganm/team-collaboration
Open

morgmart wants to merge 2 commits into
mainfrom
morganm/team-collaboration

Conversation

@morgmart

Copy link
Copy Markdown
Contributor

What this does

Gives agents a current list of their actual teammates, with exact identities and available public descriptions, so they do not have to guess from workspace instructions or search everyone on the relay. Agents receive guidance to bring needed teammates into a Solo chat, confirm they joined, and then send the assignment. This is part of how teams work, not a new permission toggle.

The existing team editor explains that invited teammates can read the chat's history. Shared team instructions can describe who handles what when public descriptions are missing; this does not introduce role fields or automatically invite the entire team.

Why it matters

A request like “ask my teammate to review this” should not send an agent searching local files and similarly named accounts to identify its collaborator. This makes Buzz's saved team roster the source for those identities while preserving the existing invitation and messaging permissions.

How it works

  • One Agents-owned roster feeds the opening context and the live teammates tool. It narrows saved team membership to the caller's owner/community and shared selectable agent choices, excluding deleted, deleting and known-archived identities. Existing mixed-community teams remain editable.
  • The service owns discovery independently of the disableable management page. It reads only exact teammate profile keys on demand, preserves identities when optional enrichment fails, and rejects results after community retirement. Private individual instructions are not shared.
  • Public descriptions are returned by the tool, not inserted into opening context: loading profiles must not invalidate Claude/goose session fingerprints. The existing tool-list update handling applies; Codex starts a fresh harness thread once when the new tool is introduced. Buzz chat history is retained.
  • Invitations and messages still use the existing tools, signed as the agent. Relay refusal remains a blocker; this does not grant human signing authority, enforce a new team-only security boundary, change ordinary channel permissions, or revoke existing chat access when a team changes.
  • Teams remain device-local; hosted-agent participation and team synchronization are outside this PR. Coordinate with the overlapping team-sync stack feat(agents): sync agent config through config channels #1226 → feat(agents): sync teams through their home community #1281 before merging; its team source must remain the single owner when integrated.

Verification

  • Independent architecture, product/UX, runtime-durability and test-honesty reviews ran. Fixed the management-page lifetime bug and removed an unnecessary save restriction that prevented editing older teams. Runtime follow-up found no remaining blocker.
  • Required pre-commit checks and pre-push TypeScript, related unit tests, design typecheck and design guards passed at 59301a77c. The full related-test selection passed with BUZZ_TEST_WORKERS=1; hooks and assertions were not bypassed.
  • Earlier focused validation: 314 tests passed before the review fixes; the changed service and actual app-composition tests passed afterward. Mutation checks proved missing production tool registration and missing archive loading fail their respective tests. Earlier scope and prompt-stability mutations also failed as intended.
  • Initial push attempts hit timing-sensitive tests. A separate test-only commit replaces real catch-up retry waits with a controlled clock, preserving all 640 signed events and ten batches and strengthening the blocked-progress assertion. The navigation timeout passed focused and final full-hook runs without code or timeout changes.
  • No browser cases added or removed. No new styles, components, or design-system exceptions; existing Teams text styling is reused.
  • Deferred: packaged/native agent runs, real-model add → confirmed join → delegation → response, both-theme/responsive/enlarged-text visual inspection, and human acceptance. No live relay invitations were made by this change's automated checks. Draft intentionally; not ready for merge.

To try: put Carl and a collaborator on a local team, describe their roles in shared team instructions if needed, open a fresh Solo chat, and ask Carl to consult that teammate. Expect exact teammate discovery, an invitation only when necessary, then a tagged assignment without filesystem or broad name-search detours.

morgmart and others added 2 commits October 17, 2026 18:23
Keep team discovery with the agent service, independent of the management page. Scope exact identities to the caller's owner and community and reuse existing invitations and messaging.

Co-authored-by: Carl <carl@agents.block.xyz>
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
Keep all ten signed event batches and assert the full lane makes no progress across a retry. Release the held turn in cleanup instead of relying on real one-second waits inside the test deadline.

Co-authored-by: Carl <carl@agents.block.xyz>
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
@morgmart
morgmart marked this pull request as ready for review October 18, 2026 03:45
@morgmart
morgmart requested a review from a team as a code owner October 18, 2026 03:45

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🤖 Star Lord’s automated source review via Wes’s account.

No actionable defects found in head 59301a77cdf5feacd9c24b4ebf54a52f873a70ce against base f81387b496b71ae8fa339804a2891f0c7dd013dd. Source assessment: 9/10 for minimalness, ownership and correctness. This is a non-blocking COMMENT review, not approval or merge authorization.

Reviewed the complete eight-file diff and supported callers: the shared owner/community-scoped roster; host-bound caller identity and reserved tool name; live team edits/deletion and community-retirement fencing; optional profile/archive enrichment; stable prompt text across public-description hydration; existing harness tool-list lifecycle; invitation confirmation and refusal handling; Teams history-access disclosure; and added service/composition coverage. The catch-up test retains all 640 signed events and ten batches while controlling retry ordering. No browser cases were added or removed. Public PR description and both commit messages were inspected; there are no attached images and no disclosure finding.

Validation is source-only: no PR code, tests, app, model or relay-invitation workflow was executed by this review. One hosted snapshot at this head showed CI required successful; Windows native validation and browser flake checks were skipped. No timing or performance improvement is claimed. Packaged/native operation, real-model delegation/response, rendered accessibility/focus, themes/responsiveness and human acceptance remain unverified as disclosed in the PR. The overlapping team-sync stack still needs its documented integration check.

Independent lanes completed by Rocket (systems/performance/lifecycle), Mantis (correctness/security/concurrency), and Groot (product/accessibility/user flows); integrated by Star Lord.

@kalvinnchau kalvinnchau left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 Requesting changes for one prompt defect on the roster-unavailable path, plus a prompt-stability issue. Inline comments include reproductions and fix directions.

Checked without findings: host-derived caller identity and argument rejection, teammates name reservation for plugins, post-await community re-check and roster rebuild, scoping to owner/community/non-deleting local agents. service.test.ts passes locally at this head (192/192) and exact-head CI Vitest jobs passed. Not covered: live model behaviour, packaged/native runs, real archive and reconnect timing.

try {
return teamPrompt(this.teamRoster(pubkey, binding), pubkey);
} catch {
return `${TEAM_GUIDANCE}\nCurrent team evidence is unavailable; use teammates to retry before choosing a collaborator.`;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 No-team agents receive team guidance when the roster is unavailable.

This catch runs before any saved-membership check. If refresh() fails while agents are running (e.g. a transient native.list() rejection), refresh sets status: "error" but keeps running, so teamRoster throws at the readiness check and every running agent, including one on no team, gets TEAM_GUIDANCE plus "Current team evidence is unavailable". That contradicts teamPrompt returning "" for no team. Because team is part of the Claude/goose session fingerprint, idle processes are also replaced on entering and leaving the error state.

Reproduction with the existing setup() in service.test.ts: create an agent with no team, deliver a mention (team is undefined), f.native.list.mockRejectedValueOnce(new Error("unavailable")), await f.service.refresh(), deliver another mention — team is now the full guidance plus the unavailable note.

Smallest fix: return "" when !this.teamList.some((team) => team.members.includes(pubkey)) before calling teamRoster, and assert the prompt (not only the tool rejection) in the existing "distinguishes no team from unavailable evidence" test.

...team,
members: team.members.flatMap((key) => {
const agent = local.get(key);
if (!agent || !selectable.has(key)) return [];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 Archive hydration changes the turn prompt.

The prompt roster filters on choices.selectable, which depends on the lazy archive read. While archive state is unknown, an archived teammate remains in the prompt; once teammates() (or any other caller) runs archives.ensure(), the next turn's prompt omits them. The team text changes, so Claude/goose fingerprints change and idle processes are replaced; after a reconnect archive state is unknown again and the prompt can flip back.

Reproduction: team [bot, sibling], sibling archived and archives.unknown = true; mention, then teammates(bot) with ensure resolving archive state, then mention again — the two team prompts differ (sibling present, then absent).

Fix direction: build the prompt from stable evidence only (saved team plus local/owner/community/not-deleting) and keep archive filtering in the tool, which already awaits ensure(); or document the accepted restart alongside the profile-stability claim in docs/agents.md.

@morgmart morgmart changed the title Give agents a current teammate roster for collaboration WAITING FOR WILL'S AGENT WORK/Give agents a current teammate roster for collaboration Oct 20, 2026

This branch has not been deployed

No deployments
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.

3 participants