cjyrainbow's WSL Claude Code (Ubuntu) kept an old /model list: a model
added in magpie was in the gateway's /v1/models but not in modelPicker.
settings.json held the picker magpie wrote (every row "… · via magpie"),
but stash.json had no claude@wsl:Ubuntu.model_picker mark for it, so
writePicker took it for the user's own and never wrote it again. An
older magpie's stash lost keys (concurrent writes / a stash that didn't
parse, fixed in 270b5257), which is the likely way the mark went.
claudeIn's pickerOurs now also counts a picker whose every row has a
model and a description ending "via magpie" (magpiesPicker) as magpie's.
That holds for native and every WSL distro, since all go through
claudeIn with their own place key. Sync rewrites it and marks it again;
Disconnect removes it, as it does a marked one. A picker with any row of
the user's own (another description) stays theirs.
docs/subsystems/agent-wiring.md says when the picker is magpie's.
Verification:
- New TestClaudePickerMagpieWroteIsKeptUpToDateWithoutItsMark, native
and wsl subtests: the reporter's state (picker written by magpie, mark
forgotten, a model added, Sync) and a user-written picker after it.
- Broke it by hand: with the old pickerOurs both subtests fail "a model
added in magpie isn't in /model: [cpa/gpt-6-luna cpa/claude-sonnet-4-6]";
with the fingerprint ignoring descriptions both fail "the user's own
picker was written over".
- go test -tags nogui ./internal/agent/ (count=1): ok, 1412s, on
origin/main 591ed58b5.
- gofmt -l clean; go vet ./internal/agent/ on darwin, GOOS=linux -tags
nogui and GOOS=windows.
- Not tried against a real WSL distro or the reporter's settings.json.