Files
magpie/docs
yetone 7693cf2634 agent: a folder holding only magpie's sign-in file is no agent (jiangshangmuyun on X)
Codex, never installed, was listed on the Agents page as "not connected"
once a ChatGPT account was added in Providers. With Codex signed in to
nothing, addLogin hands it that account and saveCodexLogin writes
~/.codex/auth.json, which makes ~/.codex; Detected took any non-empty
Dir for the agent. Claude Code is the sibling off the Mac: putClaudeLogin
writes ~/.claude/.credentials.json when Claude Code has none.

Agent.signIn names that file (auth.json for both Codex agents,
.credentials.json for Claude Code), and agentDir passes over it. A folder
with anything else of the agent's beside it (config.toml, sessions/,
settings.json, projects/, history.jsonl), its binary, or its app still
lists it.

Run:
- gofmt -l; go vet on darwin, linux (-tags nogui) and windows, on mote.
- go test -count=1 ./internal/agent ./internal/gui on mote: ok.
- win-run on xiaomi-gpu: TestSignInFileAloneIsNoAgent,
  TestClaude*Windows*, TestDetected*: ok.

Broken by hand: agentDir not passing over the sign-in file:
TestSignInFileAloneIsNoAgent red for codex and claude
(../tray-jump-scratch/break.log).

Not tried: a real ChatGPT sign-in in a sandbox HOME with no Codex. A
Codex app installed but never opened, with only magpie's auth.json in
~/.codex, is not listed until it is opened (it then writes its own
files there).
2026-11-13 13:04:03 +08:00
..