Claude Code answers a Skill call with "Launching skill: <name>" and sends
the skill's SKILL.md after the results, as a text block headed "Base
directory for this skill: …". Since d84f58fd2 (#5403) that text counts
as the agent's own (desktopNote), so it is no longer said to the run as
the user's, which was right, but nothing handed it to the run either:
on the Claude subscription route a model that launched a skill saw
"Launching skill: pdf" and never what the skill says. Every skill
launched through magpie's Claude subscription lost its body.
withSkillBodies appends each such body to its Skill call's result (two
skills at once each get their own), else to the result it follows, else
to the last; saidWithResults still leaves it out of the user's words.
Found with a real Claude Code 2.1.316 in a sandbox HOME against the live
gateway: a proxy between them showed the body in the request, and the
model answered as if it had none.
Run (mote, at this tree):
- go test -tags nogui ./internal/gateway -run
'SkillBod|Desktop|TaskNotice|SaidWith|MidTurn|Notice' -count=1: ok.
- TestSkillBodyRealClaudeCode parses the request Claude Code sent
(testdata/claude-code-skill-launch.json: its own bytes, trimmed to the
launch turn, paths shortened) and checks what the run is handed.
- Broken by hand (withSkillBodies returning results as they came):
TestSkillBodyReachesTheSkillResult and TestSkillBodiesTwoSkills red.
- go test -tags nogui ./internal/gateway -count=1 -timeout 45m: ok
(1220.8s), at origin/main 6b0b7a96e. Rebased on 8f74442e4, whose
gateway change is browser.go: -run
'SkillBod|Browser|ClaudeSub|TaskNotice' ok.
Not tried: a real run through a gateway built from this tree (the
Claude subscription's sign-in would be refreshed by a sandbox copy).
docs/subsystems/claude-subscription-bridge.md says what withSkillBodies
does, beside withTaskNotices.