Repository navigation
fix(chat): keep a crewmate with its own memory in the agent picker - #19304
Conversation
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing to check. What this change shipsInventory (3 items) — 3 justifiedIntent: 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).
[FIRST-PRINCIPLES-REVIEWED] 40b317c Description read[DESCRIPTION-READ] 959ed86aec9407743687d224541cf03e1068f6b6104fa5148ad14ce6830b3a66 That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — 🟡 CONCERNSUX-level review of 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
Suggestions
[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 |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Check that the composer pill and the session label can tell the two same-name [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 |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
7600523 to
f694c20
Compare
|
Self-review (crew-pr-reviewer, read-only): CHANGES NEEDED The fix is right at the root cause. |
|
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. |
f694c20 to
15a013b
Compare
|
|
|
|
Re self-review — both points handled on head 15a013b:
Local: 75 tests across the useAgents, AgentPicker and AgentDropdownList suites pass; |
|
15a013b to
473cc39
Compare
473cc39 to
c893ead
Compare
|
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>
c893ead to
40b317c
Compare
|
bolichen97
left a comment
There was a problem hiding this comment.
Maintainer approval after a full diff read on head 40b317c533: diff matches the description, no regression to existing behaviour found, CI and readiness green.
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_pickeroff (the default),withoutCoveredCrewmateswithholds 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 sendsagent_kind: "template", and the session binds the shareddefaultstore with no member identity.Why it matters
When an install has a crewmate
grain(own memory store) and a shared templategrain.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
dashboard.crewmates_in_agent_picker.What changed (motivation → approach → change)
Symptom: a same-name template hides a crewmate that has its own memory → root cause:
coveredtreated a shared name as proof of an identical binding → change:withoutCoveredCrewmatescovers 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-indefaultcrew).defaultAgentexception 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.mddescribes the narrower rule.This replaces fork PR #17558 by @Premshay, ported onto current main (the function gained a
defaultAgentparameter 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
agentslist, 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:reviewermember (own memory) now stays beside thereviewertemplate, with the key absent, false, non-boolean, or the config read failing.keeps a same-name crewmate that has its own memory.withholds a same-name crewmate with no memory of its own.useAgents,AgentPickerandAgentDropdownListsuites;tsc --noEmitpasses.Manual verification
Captured the agent picker from this PR's code (built
website/distat 15a013b; later heads only rebase onto main, the patch is unchanged and main has not touched the picker files; stubbed/api/agents/catalog) withdashboard.crewmates_in_agent_pickerunset: a crewmategrain(own memory, the default agent) and a templategrain, both with the same description. Both rows are listed, the crewmate under Crewmates and the template under Custom agents.Screenshots / video
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
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)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.