Skip to content

fix(chat): keep a crewmate with its own memory in the agent picker - #19304

Merged
bolichen97 merged 1 commit into
mainfrom
fix/picker-crewmate-own-memory-17558
Oct 12, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
fix/picker-crewmate-own-memory-17558

Conversation

@iamwhatever

@iamwhatever iamwhatever commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: a crewmate with its own memory can be picked from the chat agent picker even when a shared template of the same name is installed.

With dashboard.crewmates_in_agent_picker off (the default), withoutCoveredCrewmates withholds a crewmate whenever a template of the same name is listed. Its comment says picking that template is the identical binding. It is not: a template pick sends agent_kind: "template", and the session binds the shared default store with no member identity.

Why it matters

When an install has a crewmate grain (own memory store) and a shared template grain.json, the picker offers only the template. Every session opened from the picker under that name runs on shared memory: it cannot recall the crewmate's lessons, and anything it saves lands in the shared store. Nothing in the UI shows this.

Not a goal

What changed (motivation → approach → change)

Symptom: a same-name template hides a crewmate that has its own memory → root cause: covered treated a shared name as proof of an identical binding → change:

  • withoutCoveredCrewmates covers a crewmate only when it has no memory of its own (memory_store === 'default') and runs a listed template. That is the one case where a template pick is the same binding (the built-in default crew).
  • A shared name alone no longer covers. The defaultAgent exception added on main by fix(chat): keep the built-in default agent selectable in the picker #18297 is kept unchanged.
  • docs/system-specs/modules/crew-mode.md describes the narrower rule.

This replaces fork PR #17558 by @Premshay, ported onto current main (the function gained a defaultAgent parameter since that PR was opened; the conflict was resolved by keeping that parameter and its rule). Authorship is kept in git history.

Replaces #17558

Backwards compatibility

Compatible: a crewmate that was withheld only because of a shared name now appears under Crewmates. The folded name-only agents list, the request contract and the config key are unchanged.

Removes nothing: the change only stops withholding rows; no row, key, record or function is removed or tightened.

Tests

  • website/src/test/useAgents.hideCrewmates.test.tsx:
    • The fixture's reviewer member (own memory) now stays beside the reviewer template, with the key absent, false, non-boolean, or the config read failing.
    • New: keeps a same-name crewmate that has its own memory.
    • New: withholds a same-name crewmate with no memory of its own.
    • The existing default-agent cases (Chat agent picker hides default after switching agents #18239) still pass.
  • 75 tests pass across the useAgents, AgentPicker and AgentDropdownList suites; tsc --noEmit passes.

Manual verification

Captured the agent picker from this PR's code (built website/dist at 15a013b; later heads only rebase onto main, the patch is unchanged and main has not touched the picker files; stubbed /api/agents/catalog) with dashboard.crewmates_in_agent_picker unset: a crewmate grain (own memory, the default agent) and a template grain, both with the same description. Both rows are listed, the crewmate under Crewmates and the template under Custom agents.

Screenshots / video

agent picker at 15a013b9a, same-name crewmate and template

The descriptions are identical on purpose, so the frame shows what tells the rows apart without them. The two rows sit under different headings: Crewmates (avatar, own memory) and Custom agents (hint: "Runs on your default crewmate's workspace and memory"). A row-level own-memory / shared-memory tag, and naming the kind in the composer pill, are tracked in #19472.

Related Issues

Fixes #19302

Pattern harvest

Rule candidate: review-prompt
Pattern: a name collision between a crewmate and a shared template is not proof the bindings are identical; picker coverage checks must compare the binding (memory store + agent), not the name.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.

Original work by @Premshay in #17558 — thank you.

@iamwhatever
iamwhatever requested review from a team and KiroCrewCaptain as code owners October 12, 2026 06:30
@iamwhatever
iamwhatever requested a review from buluoray October 12, 2026 06:30
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 12, 2026
@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 40b317c533ed11cd78d3e85d2699d8aec508c73c — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

First-Principles-Verdict: PASS

Nothing to check.

What this change ships

Inventory (3 items) — 3 justified

Intent: a user can open a chat on their own-memory crewmate from the picker even when a shared template has the same name. FIX (#19302).

  1. A crewmate with its own memory now appears under Crewmates next to a same-name template, with crewmates_in_agent_picker off — justified
  2. A same-name crewmate on default memory that runs a different agent is no longer hidden either — justified
  3. The crew-mode spec and the withoutCoveredCrewmates doc comment now describe the narrower coverage rule — justified

[FIRST-PRINCIPLES-REVIEWED] 40b317c

Description read

[DESCRIPTION-READ] 959ed86aec9407743687d224541cf03e1068f6b6104fa5148ad14ce6830b3a66

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — 🟡 CONCERNS

UX-level review of 40b317c533ed11cd78d3e85d2699d8aec508c73c — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

UX-Verdict: CONCERNS

Two identical "grain / Garden helper" rows now appear side by side, and a first-time reader couldn't tell which one keeps the crewmate's memory.

Watch

  • The newly shown row reads as a duplicate. When the crewmate row (covered now needs memory_store === 'default') appears next to a template with the same name and description, the only differences are an avatar, a "Default" tag and the group heading. In shot-01 the blind reader saw "the same thing listed twice… I can't tell whether they are one assistant or two, or which one I'd be talking to." They also said they would not click the template row: "worried it could change or mix up the first one's memory." This affects every install that has a crewmate and a template with the same name, every time the picker opens. Users can now reach the right row, but they still can't tell it apart from the other. The smallest fix is to pull the own-memory / shared-memory row tag tracked in Agent picker: tell same-name crewmate and template rows apart #19472 into this PR.
  • The heading hint doesn't work as the thing that tells the rows apart. The PR leans on "Runs on your default crewmate's workspace and memory — nothing new is created." to separate the rows. The reader said "I would read it twice first. I don't understand 'workspace' and 'memory' here." The hint also makes a third use of "default", and the reader tied it to the wrong one. The crewmate's own row was only read correctly as "a guess".

Suggestions

  • Put a short tag on the template row itself, such as "Shared memory", instead of relying only on the group heading's hint.

[UX-REVIEWED] 40b317c

Description read

[DESCRIPTION-READ] 3ff3510e1792c61948d80457ba97e35a2af9899913c3cbfdf97a652307ee1788

That sha256 names everything this verdict read: the PR description, plus the 4 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 40b317c533ed11cd78d3e85d2699d8aec508c73c — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Check that the composer pill and the session label can tell the two same-name grain rows apart once one is picked; that work is deferred to #19472.

[DESIGN-REVIEWED] 40b317c

Description read

[DESCRIPTION-READ] feb0447ffd8e60c8c66906edf9b9b0e0ab5a0d9c00bb3cda0cc9947a9407b988

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 40b317c533ed11cd78d3e85d2699d8aec508c73c and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 40b317c

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 40b317c533ed11cd78d3e85d2699d8aec508c73c: <one-sentence reason>

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 40b317c533ed11cd78d3e85d2699d8aec508c73c — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 40b317c

Verdict parsed from the review's SHA-scoped output markers for commit 40b317c533ed11cd78d3e85d2699d8aec508c73c.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 40b317c533ed11cd78d3e85d2699d8aec508c73c: <one-sentence reason>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 12, 2026
@iamwhatever
iamwhatever force-pushed the fix/picker-crewmate-own-memory-17558 branch from 7600523 to f694c20 Compare October 12, 2026 07:53
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 12, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor Author

Self-review (crew-pr-reviewer, read-only): CHANGES NEEDED

The fix is right at the root cause. withoutCoveredCrewmates (website/src/hooks/useAgents.ts:173) used to treat a template with the same name as the same binding. Now it covers a crewmate only when memory_store === 'default' and the crewmate runs a listed template; a template pick binds the shared default store, so a crewmate with its own memory is a different binding. The defaultAgent exception is unchanged, and the new tests (keeps an own-memory same-name crewmate, withholds a no-memory one) would fail on base. Two things block it, though. First, this same-repo PR commits temp-screenshots/crewmate-own-memory/agent-picker-open.png and description.md. The repo rule is attach, never commit, so drop both files and attach the frame with gh pr edit 19304 --attach instead (capture a fresh one if the fork author's frame cannot be reused). Second, the UX CONCERNS on head f694c20 has no target=ux disposition. Its Watch item is real: in a real install the two "grain" rows can look identical, and picking the wrong one is the silent shared-memory binding this PR exists to fix. Either add a small own-memory / shared-memory tag on same-name rows, or rebut with evidence of what tells the rows apart (for example the Crewmates vs Templates group headings) and defer the tag to an issue. — crew-pr-reviewer

@iamwhatever
iamwhatever marked this pull request as draft October 12, 2026 15:48
@iamwhatever

Copy link
Copy Markdown
Contributor Author

Converted to draft by crew-pr-reviewer: the self-review above is CHANGES NEEDED. Mark ready again (gh pr ready 19304) once the points are addressed.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision labels Oct 12, 2026
@iamwhatever
iamwhatever force-pushed the fix/picker-crewmate-own-memory-17558 branch from f694c20 to 15a013b Compare October 12, 2026 17:00
@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Same name, two bindings, no visible difference. span=f0cf2bc4c3e7

Outcome: rebutted (row-level tag deferred to #19472)
The two rows are not drawn alike: the crewmate sits under the Crewmates heading with its avatar, and the template sits under Custom agents, whose hint reads "Runs on your default crewmate's workspace and memory" (AgentDropdownList.tsx group chrome, shown in the attached frame). That heading text, not the author's description, is what names the shared memory.
A per-row "own memory" / "shared memory" tag needs new strings in all 14 locales plus a test; it is tracked in #19472 so this fix stays a filter change.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • "Default" points at two rows. span=597b48fad650

Outcome: rebutted (deferred to #19472)
This PR does not touch either control: the Default badge rule (member rows only) and the "Default for new sessions" footer are unchanged on main. The pair is newly visible only because the crewmate is no longer hidden; making the two agree for a same-name pair is tracked in #19472.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Own memory / shared memory row tag span=c22fe5087a08

Outcome: deferred to #19472
Agreed as a follow-up: new i18n strings across all locales plus a same-name-pair test, outside this filter fix. Until then the group headings and the Custom agents hint tell the rows apart.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Composer pill and session label name the kind span=a22cc62021f9

Outcome: deferred to #19472
The pill and the session-list label are other surfaces this PR does not change; naming crewmate vs template there is tracked in #19472.

@iamwhatever

Copy link
Copy Markdown
Contributor Author

Re self-review — both points handled on head 15a013b:

  1. Committed screenshots. temp-screenshots/crewmate-own-memory/agent-picker-open.png and description.md are no longer in the diff (one commit, Premshay's authorship and Co-authored-by trailers kept; the commit message no longer points at the file). The fork author's frame is attached to the PR body with gh pr edit --attach instead.
  2. UX CONCERNS on f694c20. Took option (b): a per-row tag needs new strings in all 14 locales plus a test, over the small self-contained bar. Each UX item has its own target=ux disposition: rebuttals for f0cf2bc4c3e7 and 597b48fad650 (Crewmates vs Custom agents headings, avatar, and the "Runs on your default crewmate's workspace and memory" hint tell the rows apart), deferrals for c22fe5087a08 and a22cc62021f9. Follow-up: Agent picker: tell same-name crewmate and template rows apart #19472 (row tag, composer pill / session label, Default badge agreement).

Local: 75 tests across the useAgents, AgentPicker and AgentDropdownList suites pass; tsc --noEmit passes.

@github-actions github-actions Bot removed the readiness: checking Automated validation is still running label Oct 12, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • The crewmate row was understood but not trusted. span=18c9c7dbeb9b

Outcome: rebutted
The lane notes the reader read the crewmate row correctly; the low-trust note is covered by the row tag in #19472.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Name the consequence in the Custom agents hint span=46a3d05ae40f

Outcome: deferred to #19472
The hint string predates this PR and is shared by every template group; rewording it touches all 14 locales and is copy work for #19472.

@iamwhatever
iamwhatever force-pushed the fix/picker-crewmate-own-memory-17558 branch from 15a013b to 473cc39 Compare October 12, 2026 17:56
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 12, 2026
@iamwhatever
iamwhatever force-pushed the fix/picker-crewmate-own-memory-17558 branch from 473cc39 to c893ead Compare October 12, 2026 18:28
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 12, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Same-name rows read as duplicates. span=1c6ceb6be4bf

Outcome: deferred to #19472 (re-raise of f0cf2bc4c3e7 / f4c8f1941a7d)
The rows sit under different headings and only the crewmate wears an avatar; the per-row own-memory / shared-memory tag needs new strings in all 14 locales and is tracked in #19472. The frame uses identical descriptions on purpose.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • The section hint doesn't explain the difference. span=35a0684ef804

Outcome: deferred to #19472 (re-raise of 46a3d05ae40f)
The hint predates this PR and is shared by every template group; rewording it is copy work across all locales, recorded on #19472.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Put the difference on the row as its second line span=2bb8bc6ae87f

Outcome: deferred to #19472
Recorded on #19472 as the proposed shape of the row tag.

withoutCoveredCrewmates withheld a crewmate whenever a template of the same
name was listed, on the premise that picking the template is the same
binding. It is not: a template pick binds the shared default store, so the
crewmate's own memory became unreachable from the picker and every pick of
that name ran on shared memory. Cover only a crewmate with no memory of its
own that runs a listed template.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Premshay <28099628+Premshay@users.noreply.github.com>
@iamwhatever
iamwhatever force-pushed the fix/picker-crewmate-own-memory-17558 branch from c893ead to 40b317c Compare October 12, 2026 19:33
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Oct 12, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • The newly shown row reads as a duplicate. span=48f255d6e518

Outcome: deferred to #19472 (re-raise of f0cf2bc4c3e7 / f4c8f1941a7d / 1c6ceb6be4bf)
Same finding as the last three heads. Rows differ by heading, avatar and Default tag; the per-row memory tag needs new strings in all 14 locales and is tracked in #19472.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • The heading hint doesn't work as the thing that tells the rows apart. span=2c67f41b9478

Outcome: deferred to #19472 (re-raise of 46a3d05ae40f / 35a0684ef804)
The hint predates this PR and is shared by every template group; rewording it is locale-wide copy work recorded on #19472.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Short tag on the template row span=b87e4ae2b893

Outcome: deferred to #19472 (re-raise of c22fe5087a08 / 2bb8bc6ae87f)
Recorded on #19472 as the row-tag shape.

@iamwhatever
iamwhatever marked this pull request as ready for review October 12, 2026 21:01
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Oct 12, 2026

@bolichen97 bolichen97 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.

Maintainer approval after a full diff read on head 40b317c533: diff matches the description, no regression to existing behaviour found, CI and readiness green.

@bolichen97
bolichen97 merged commit 41ce9a8 into main Oct 12, 2026
104 checks passed
@bolichen97
bolichen97 deleted the fix/picker-crewmate-own-memory-17558 branch October 12, 2026 22:30
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 12, 2026
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.

Agent picker hides a crewmate with its own memory behind a same-name template

3 participants