cybercaius (Discord #help) runs Claude Desktop through magpie's gateway
and saw Desktop's work listed under another agent. Desktop set to a
gateway is in its third-party inference mode, and Desktop 2.7032 then
starts its Code tab's Claude Code with CLAUDE_CODE_ENTRYPOINT
"claude-desktop-3p" (its nK: type "3p" -> "claude-desktop-3p", else
"claude-desktop"; the value is in Claude Code's own entrypoint enum).
The calls reader (calls.go) and the trace reader (traces_claude.go)
only took "claude-desktop", so every call from such a session was
counted as Claude Code's. Both now ask one desktopEntrypoint.
This is what Desktop's transcripts say. The gateway's own attribution
of a live request (agentOf, by key then User-Agent) is not changed:
with Desktop's own key magpie-claude-desktop it already names Desktop,
and the reporter's misattributed title request was not reproduced.
Run on mote: go test ./internal/sessions -run
'TestCallsDesktop3pCodeTab|TestClaudeTraceSubagentsShareSessionWithoutIDCollisions|TestCalls'
ok. Broken by hand: both readers back on == "claude-desktop" ->
TestCallsDesktop3pCodeTab and the trace test's claude-desktop-3p case
fail. Rebased on origin/main bc247a8cc: go test -tags nogui
./internal/sessions on the Linux box (WSL magpie-desktop), the whole
package, ok; go vet for Linux and Windows ok.
Not tried: a real Desktop 3p session's transcript (the value is read
from Desktop's asar, not captured from a file).