Skip to content

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

Closed
Premshay wants to merge 1 commit into
kirodotdev:mainfrom
Premshay:fix/picker-same-name-crewmate
Closed

Premshay wants to merge 1 commit into
kirodotdev:mainfrom
Premshay:fix/picker-same-name-crewmate

Conversation

@Premshay

@Premshay Premshay commented Oct 6, 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. We found four working sessions in this state, by reading each one's execution context (selection_kind='template', member_id=None, store default).

Not a goal

  • Changing the default of dashboard.crewmates_in_agent_picker.
  • Hiding the same-name template. Both rows now show, as they already do with the key on.

What changed

  • 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.
  • crew-mode.md and the feature map describe the narrower rule.

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.

Tests

  • useAgents.hideCrewmates.test.tsx:
    • The fixture's reviewer member (own memory) now stays beside the reviewer template.
    • New: a same-name member with no memory of its own is still withheld.
    • Five cases fail with the hook change reverted.
  • 53 tests pass across the useAgents and AgentDropdownList suites. tsc --noEmit and docs-lint pass.

Pattern harvest

A name collision between a crewmate and a shared template is not proof the bindings are identical: a template pick binds the shared default store with no member identity, while a crewmate pick binds the member's own memory. Picker coverage checks must compare the binding, not the name.

Screenshot evidence: agent picker open

@Premshay
Premshay requested a review from a team as a code owner October 6, 2026 23:49
@Premshay
Premshay requested a review from iamwhatever October 6, 2026 23:49
@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 7, 2026
@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5, fork) — ✅ PASS

Premise-level review of 49b6e20feb524946276fc96be2a57eba4cc5bc62 via the fork AI-review pipeline — 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

With the key off, check that the picker's two same-name reviewer/grain rows can be told apart. The base spec says the two groups only come back with the key on.

What this change ships

Inventory (3 items) — 3 justified

Intent: let someone pick a crewmate that has its own memory from the chat picker when a shared template has the same name. This is a FIX.

  1. With the key off (the default), a crewmate with its own memory now shows beside a same-name template instead of being hidden. — justified
  2. A same-name crewmate with no memory of its own is still hidden. — justified
  3. The crew-mode.md coverage paragraph and the withoutCoveredCrewmates doc comment now describe the narrower rule. — justified

The base test comment said "both are the same binding". The description quotes that claim and refutes it. Its rebuttal matches the base code: execution_context.py:1006-1009 treats only a name-only pick or a member pick as a member session, so an explicit template pick never carries member identity. The narrower rule is also what the base spec already promised: "A crewmate no template covers stays pickable". withoutCoveredCrewmates is the only place that checks coverage: the pattern selection_kind === 'template' matched one coverage set in website/src (useAgents.ts:152), and no other picker has this rule. The committed screenshot under temp-screenshots/ follows the repo's evidence convention (.gitignore:116, ux-review.yml:106).

[FIRST-PRINCIPLES-REVIEWED] 49b6e20

Description read

[DESCRIPTION-READ] 0f9845aacc0f2499d0ecd1f9e0ec53fe6a2d869efdd3d30f20bee4ea578b2bf3

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 7, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5, fork) — ✅ PASS

Design-level review of 49b6e20feb524946276fc96be2a57eba4cc5bc62 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Check that the picker's two same-name grain rows can be told apart: only the group heading and the hint line separate the crewmate from the template.

[DESIGN-REVIEWED] 49b6e20

Description read

[DESCRIPTION-READ] 2863ebea668392154e9a7898f863adc2ead87952b62d30c22a924689e99cf8c2

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 7, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5, fork) — 🟡 CONCERNS

UX-level review of 49b6e20feb524946276fc96be2a57eba4cc5bc62 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

UX-Verdict: CONCERNS

The picker now lists two rows both called "grain", and the only thing separating them is the group headers. No first-time reader has checked whether that's enough.

Watch

  • Two rows with the same name. The patch drops templates.has(c.name) || from covered. As a result, attachment-01 shows "grain" under Crewmates and again under Custom agents, with the same name and the same weight. The only memory cue is the subhead under the Custom agents header: "Runs on your default crewmate's workspace and memory". The row descriptions in the screenshot ("Garden helper with its own memory" / "Shared garden helper template") are fixture copy. Real installs won't have them, so in real use the two rows look the same apart from their group.
    • Severity: medium. It hits every install where a crewmate and a template share a name, and every time the picker opens. Picking the wrong row puts the session on shared memory without any warning.
    • Smallest fix: add a short muted memory tag to each same-name row, for example "own memory" on the crewmate row and "shared memory" on the template row.
  • Not read cold. The screenshot shows both rows, but this fork lane has no blind read, so nobody has confirmed that a newcomer can tell the two "grain" rows apart.

[UX-REVIEWED] 49b6e20

Description read

[DESCRIPTION-READ] aaef15ca05406e33431a5374ad23f446881c91058ebbb6c3a18569303c396f32

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 7, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review (fork) — ✅ no blocking findings

Reviewed 49b6e20feb524946276fc96be2a57eba4cc5bc62 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 49b6e20

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review (fork) — ✅ no blocking findings

Reviewed 49b6e20feb524946276fc96be2a57eba4cc5bc62 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 49b6e20

@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Oct 7, 2026
@Premshay
Premshay force-pushed the fix/picker-same-name-crewmate branch from c6e5ef1 to 4d7e3ff Compare October 7, 2026 19:26
@github-actions github-actions Bot added readiness: checking Automated validation is still running merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: action required A blocking check or review needs attention and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 7, 2026
@Premshay
Premshay force-pushed the fix/picker-same-name-crewmate branch from 4d7e3ff to 0d24888 Compare October 8, 2026 08:05
@Premshay

Premshay commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

For the UX evidence gap: I can capture the picker state this review asks for — config key off, a crewmate with its own memory beside a same-name template, both group headers visible, the template row highlighted for a bound session — as a still from the built SPA using the repository's gateway-free fixture helpers. Say the word and I will attach it here, or drop it under temp-screenshots/ as the lane prefers.

On the watch item: the two same-name rows are the intended state of this PR, and the roster avatar plus the group header are the only existing cues. If the capture shows that is not enough to tell the rows apart, I will follow with a small label change rather than argue it.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: action required A blocking check or review needs attention labels Oct 8, 2026
@Premshay
Premshay force-pushed the fix/picker-same-name-crewmate branch from 0d24888 to cf71649 Compare October 8, 2026 08:23
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running and removed readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Oct 8, 2026
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: checking Automated validation is still running labels Oct 8, 2026
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.

Screenshot evidence: ![agent picker open](temp-screenshots/crewmate-own-memory/agent-picker-open.png)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Premshay
Premshay force-pushed the fix/picker-same-name-crewmate branch from cf71649 to 49b6e20 Compare October 8, 2026 19:27
@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 merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Oct 8, 2026
@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Oct 9, 2026
@Premshay

Copy link
Copy Markdown
Contributor Author

Automated verification report — kirocrew-steward.

The picker repair remains unpublished while the required build gate is red on main.

The PR worktree at b8b9bb136554224685f9e4a46c57f07c4b421746 and clean main at faa0b5b3307ca8d74c2f265078331f57f4d1bcd1 both fail npm --prefix website run build with:

gen-ui-index: src/kiro_crew/docs/ui-index.generated.json is stale. Run `npm run gen:ui` in website/ and commit the result.

Their regenerated index previews are byte-identical (SHA-256 11cdbae1ee9de8c23556966ce4cdc354506437f8aa5d2f8187796d3bc1ea430c). The missing entry is setting:chat.topic-tags, introduced by 7e55c34d7; the guide plans already match. The picker change does not alter either generated output. Main's subsequent 24aab85bfbcadc601af45620d674f08cf06cbfac changes only crew-log tests.

The focused picker/Mate verification passed 16 tests. No generated index change, gate override, or source push was made for this inherited failure. Existing index maintenance PRs #18753 and #18803 address earlier staleness; neither has yet been verified to cover the current Topic tags omission.

Next: wait for a current-main index repair, rebase, and rerun the unchanged build gate and remaining prepare-pr checks.

@iamwhatever

Copy link
Copy Markdown
Contributor

Thank you @Premshay for finding and fixing this.

Your change has landed in a main-repo PR, #19304, ported onto current main (the conflict was with the defaultAgent rule from #18297, which is kept as is). Your commit is cherry-picked with you as author, plus a Co-authored-by trailer, so your authorship stays in the git history. The bug is tracked in #19302. All checks, including PR Readiness, are green on #19304.

Closing this PR in favour of #19304. Your branch is left untouched.

@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Oct 12, 2026
@Premshay
Premshay deleted the fix/picker-same-name-crewmate branch November 13, 2026 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork Pull request from a fork (external contributor) merge conflict Branch has merge conflicts with its base — author must resolve before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants