Repository navigation
Conversation
Set reloadSkills on successful SessionStart auto-sync so skills installed during the hook are visible in the same session. Preserve the flag when plugin hooks contribute additionalContext. Fixes symposium-dev#344
| /// After a successful SessionStart auto-sync, Claude Code receives | ||
| /// `reloadSkills: true` so skills installed during the hook are visible | ||
| /// in the same session (see #344). | ||
| #[tokio::test(flavor = "multi_thread")] |
There was a problem hiding this comment.
Now that I think about it, this is not ideal as for what I was going for, not that something is wrong with this code.
These test checks the hook output for that reloadSkills flag, but doesn't demonstrate that a newly installed skill becomes available in that first session.
The ideal way that I had envisioned is We'd need a real Claude session where the skill doesn't exist before session start, then show that Claude can discover and use it immediately after Symposium installs it.
There was a problem hiding this comment.
I'm working to get the right infra for this kind of tests, so, as for the current testing infra I don't think we can test this, because it sync first, and such we can't prove our hypothesis in question here.
I'm going to get that infra ready first, then we can fix this using it.
There was a problem hiding this comment.
The proof that we want is: Symposium installs a previously absent skill during SessionStart, and Claude invokes it on the very first prompt.
The way to achieve this is start with a controlled before-and-after with real Claude, which needs the support of that infra. So, I'll start by implementing that, then come back to this after that has shipped chat
Summary
After a successful
SessionStartauto-sync, Claude Code hooks now returnreloadSkills: trueso skills installed during the hook are visible in the same session.Motivation
Fixes #344. Claude Code discovers skills before
SessionStarthooks finish; withoutreloadSkills, skills installed on the first sync may be invisible until the next session.Changes
reloadSkillsto canonicalSessionStartOutput(symposium-sdk).run_auto_syncsucceeds onSessionStart.hookSpecificOutputwire format.reloadSkillswhen plugin hooks merge additional context (JoinedContext).Tests
cargo test session_start_requests_skill_reload(unit)cargo test session_start_requests_skill_reload_on_claude(integration hook stdout)Notes
Other agents ignore unknown hook fields; only Claude Code honors
reloadSkillstoday.Fixes #344