Common issues
Cache names must preserve source identity
Replacing path separators with ordinary filename characters loses information: a/b and a--b both became a--b in the Git cache. Joining source fields with delimiters can also confuse ref and subpath boundaries, and case-insensitive Windows filenames cannot represent case-sensitive Git paths directly. Git cache names therefore hash the complete length-prefixed identity into lowercase hexadecimal; do not restore the old ambiguous names as a fallback for cache misses.
Known hook implementation gaps
The following issues were identified by auditing our hook implementations against the agent reference docs (md/design/agent-details/). They don’t cause crashes (the fallback path handles events without agent-specific handlers) but mean some features are incomplete.
A tool decision has to reach the agent in the form it honors
A deny or rewrite that the translation drops fails open: the tool runs, and since the reason still reaches the model as context, the agent can even report the call as blocked. That was the state of Claude, Codex and Copilot until each from_symposium mapped decision and updatedInput, so check the wire output per agent (tests/hook_decisions.rs) whenever a PreToolUse field is added. Two agents need more than a field:
- Claude and Codex apply
updatedInputonly alongside apermissionDecision, and"allow"skips the user’s permission prompt. Claude gets"ask"; Codex has no"ask", so a rewrite is not applied there. - Kiro reads no decision from stdout. A denial becomes exit 2 in the Kiro handler’s
respond, which is why the pipeline returns aHookResponserather than bytes.
Copilot also runs Claude Code’s hooks
Copilot CLI reads .claude/settings.json as well as its own hook files. In a project where both agents are configured, every Copilot event runs symposium hook twice: as copilot from .github/hooks/symposium.json, and as claude from Claude’s settings. Plugin hooks with side effects run twice, and whatever symposium tells the agent once (such as a notice) is taken by whichever invocation runs first. A notice written for one agent can then go to the other: when the claude invocation runs the sync that copies skills into .agents/skills/, the copilot invocation finds nothing left to copy. So a reload notice is not built from the sync the invocation ran: every sync records what it installed for each agent in the per-directory state, and each agent’s hook names what is pending for it until a response carrying the notice reaches it.
Hook stdout belongs to the agent
An agent parses everything symposium hook writes to stdout. One line ahead of the JSON and Claude Code falls back to treating it all as plain text (which reaches the model only on SessionStart and UserPromptSubmit), while Copilot drops the output entirely. The in-process test pipeline cannot see this, because the leaks come from around it: the report layer, which the binary installs (and leaves out for hooks), and child processes that inherit stdout (plugin install_commands send theirs to stderr). Anything new that prints during a hook, or spawns a child that might, needs the same care; tests/hook_stdout.rs runs the real binary to catch it.
Antigravity footguns
Two Antigravity behaviours fail silently rather than loudly, so they are worth knowing before debugging a hook that “does nothing”.
{} on PreToolUse denies the tool call
Antigravity ignores hook exit codes entirely; only stdout decides. On
PreToolUse, an object without a valid decision ({} included, as well as
{"decision": ""}) is treated as a denial, while writing nothing at all
allows. A plugin hook in Antigravity’s own format that answers with no
decision (or an empty one) is read as the denial it is, so dispatch stops
there.
Symposium’s own answer leaves decision unset unless something decided, so a
hook that only adds context cannot overwrite another hook’s "ask". That makes
{} the common final answer (no plugin contributed, or one only added context),
so AntigravityPreToolUseEvent::respond, which every response goes through, adds
"decision": "allow" to a final object that has none. Dropping that step would
block every tool call.
Unknown event names and shapes are accepted and never fire
An unrecognised event key in hooks.json, or the wrong structure for a known one
(a flat handler list where a matcher group is expected, or vice versa), produces
no error — the hook simply never runs. ANTIGRAVITY_EVENTS and
antigravity_is_tool_event in agents/mod.rs are the single source of truth for
both, and the unit tests assert the shape per event for exactly this reason.
Symlinks in source trees
DirEntry::file_type() reports the entry, so a symlink is neither is_dir() nor is_file() and falls through the gap between the two branches — silently, with no error and no warning. That is how installing a skill used to drop every symlinked file in it: sync’s copier had exactly that shape, and so did the scan it compares against. fs::metadata follows the link; DirEntry::metadata does not. Reach for dir_walk::resolved_kind instead of either.
Path::is_dir() does follow links, which is the other half of the trap: a walk written that way already descends into linked directories, so it can already loop on a link naming a directory it is inside. Guard any such walk with dir_walk::Ancestors.
And when two walks over one tree feed each other — a copy, and the comparison that decides whether to copy — they have to be the same traversal. Fixing one and not the other does not show up as a wrong file; it shows up as a sync that reinstalls the same skill forever.
Destinations need the opposite treatment. A link found in an agent’s skills directory is the user’s, so sync never follows it, and since one agent’s skills directory can itself be a link to another’s, install targets are compared by resolved path. Comparing literal paths there made the reap delete, through the link, the skills it had just installed. To ask whether a destination slot is taken, use fs::symlink_metadata: Path::exists() follows the link and reports a dangling one as absent, and installing into that slot then fails on every sync.
Bookkeeping beside content is not content
A directory Symposium reads skills from can also hold a file Symposium keeps for itself: the git cache writes its metadata (.symposium-cache-meta.json, with the time of the last freshness check) inside each cache entry, and a source.git group whose URL names a skill directory is read from that entry in place. Such a file changes without the skill changing, so a walk that installs or compares content has to leave it out, as sync’s walk_tree does. Copying it would make every freshness check look like an update of each installed copy, and every agent would be told the plugin changed.
Plugin-supplied names are untrusted input
Plugin content must not decide where Symposium writes. A name it supplies, such as a skill’s name, can resolve outside the directory it is joined onto (Path::join does not confine it), so it never becomes part of a path unchecked. Validate it with skills::is_safe_dir_name, which also covers Windows-specific path forms, rather than with a check of your own.
Names compare as package identities
Whether two names are the same package is the package manager’s rule, not a string comparison: cargo treats widget-lib and widget_lib as one crate, while a registry compares its plugin names exactly. So code that matches a name typed by the user against a plugin or a dependency resolves both through PmRegistry::identify or PmRegistry::identity and compares the results, rather than comparing strings or applying one ecosystem’s normalization to every name. Nor is a name a crate by default: identify asks the package managers whether they have it and fails with no package named ... when none does. A [plugins] entry names no package manager, so the PluginsConfig queries take the PackageId being checked and compare the entry under that id’s package manager: disable = ["my_plugin"] covers the crate my-plugin but not a registry plugin named my-plugin. A "*" entry is a pattern, not a name: the PluginsConfig queries treat it as matching everything, so code that lists entries skips it rather than reporting it as a plugin.
An identity is for comparing, never for loading. PmRegistry::identity and identify return the name in the package manager’s folded form (widget_lib for the crate widget-lib), and a package manager fetches a package under the name it is published as: cargo finds no widget_lib on crates.io. So a fetch or load_plugin takes the id PmRegistry::find answers with, which names the package as its package manager has it, or one the dependency list gave, as enabled_dependencies and use do, and the identity only decides whether two of those are the same package. A name stored for later, such as a use entry, is the one find answered with too. A registry plugin is the exception: the id find answers with carries its manifest name, while a registry’s package manager loads an entry by its path in the registry, so code that needs a registry plugin again takes it from the loaded registry, matched by identity, as remove_plugin does.
Remote package managers need identity and lifecycle boundaries
A remote PM’s naming rules do not come from its configured name. Every PM
implements canonical_names to answer batches of names;
lookup and config comparisons await that operation for both returned package
names and user entries. Failed normalization marks the PM failed and cannot
bypass disable or authorize cleanup. Consent decisions retain the discovered
package’s PM identity, and recording them uses that PM’s naming rules for both
approvals and declines. Activation includes enabled dependencies from every
ecosystem. Consent recording propagates normalization errors instead of
reporting an unwritten decision as saved.
A remote PM can die after successfully describing the project and dependencies.
Transport failures carry an Unavailable error marker so PmInstance also
records failures during package lookup and load_plugin. Those failures must
suppress stale-skill and MCP cleanup. A valid error response about one package
leaves the PM usable and does not block cleanup for its whole ecosystem.
Killing only the PM leaves its workers running. RemotePm owns a process group
on Unix or a job object on Windows, guarded from spawn through initialization,
requests, and connection drop. Cancellation marks the connection unusable
before initialization starts and terminates the tree before scheduling reaping.
Remote requests ordinarily have a thirty-second timeout, longer than Codex and Copilot’s ten-second hook deadline. Hook dispatch gives all remote PMs one shared two-second deadline, including initialization and subsequent operations. Expiry fails PM work and leaves time for healthy local plugins to return their decisions; timing out the whole hook would discard those decisions too.
A source that reads as empty is not an empty source
A listing that swallows read errors returns the same empty list for “nothing there” and “could not look”, and anything that removes what a source stopped offering turns the second into data loss: a [[registry]] path on an unmounted share would make sync delete every skill installed from it. So PackageManager::registry_plugins fails when a registry cannot be read and otherwise says whether every entry loaded, PluginRegistry::unreadable_registries carries a registry that failed either way to sync, and sync skips its stale-skill and project MCP cleanup while that list is not empty. An entry whose manifest fails to parse is the same case on a smaller scale: the plugin did not withdraw what it installed. Any new pass that removes things because a source stopped offering them belongs behind the same condition. The user config is such a source for the agent list: one that cannot be read loads with no agents, so sync refuses to run on it rather than reaping every agent’s skills and hooks. The opposite mistake is as bad: a source that is legitimately absent must not count as unreadable, or cleanup never runs again, which is why the built-in ~/.symposium/plugins/ is left out when nothing exists at that path.
One decision computed twice drifts
Where one rule guards several passes, bind it once and have every guard read that binding. sync has several such passes, the project MCP removal inside the per-agent loop, the MCP removal for a plugin use --remove disabled, and the stale-skill reap, and all read the single skip_cleanup. Spelling the rule out twice instead invites the copies to diverge, and a shadowed rebinding hides the divergence at the use site: the guard still reads skip_cleanup, so nothing there says which of the two it got. Had one copy omitted Workspace::failed, a failed package manager would keep its skills and silently lose its MCP entries, which is exactly the data loss the rule exists to prevent. The same holds for anything else derived from a condition several passes share, and across entry points: sync_user_plugins compiles and reaps the user-level plugins outside a workspace, so the rule is one function, cleanup_held_back, that it and sync both call.
An input that does not exist yet is still an input
A cache keyed on “have my inputs changed?” has to name the files whose appearance changes the answer, not just the ones it read. ProjectInfo::inputs is the files a package manager’s answers depend on, and the mtime of a file that does not exist records as None, so a path reported while absent and later found present reads as a change. That is what lets a hook notice a workspace it could not have read before: a Cargo.toml appearing between the session’s starting directory and the cached root re-roots the workspace, and no lockfile under the old root would ever show it. A package manager that reports only the files it actually opened will pin a stale root for the rest of the session. The matching rule on the consumer side is already in WorkspaceState::fresh: a workspace that names no inputs is never fresh, since nothing would tell that its answers had changed.
Agent Plugins manifests are closed but forgiving
plugin.json has a closed schema, yet the format requires an unknown top-level field, or an extensions that is not an object, to be reported and ignored while the package still loads. #[serde(deny_unknown_fields)] would reject the package instead, and a plain Option<String> would accept the null the schema forbids, which is why plugins/agent_plugin.rs checks the manifest by hand over a serde_json::Value. Its dev.symposium namespace is the opposite case and stays strict, because ignoring a typo there would make a package apply more widely than its author meant.
Installed copies are never sources
A directory Symposium installed carries a .symposium marker file, and the trees it installs into can also be read as sources (.agents/skills/ is a workspace skill group, and a registry can point at a tree holding copies). Any walk that discovers sources skips marked directories, as find_skill_files_recursive and the registry layout walk do, or a sync reads its own output back. The layout walk checks that the marker is a file, because a project root can hold a .symposium/ directory that is not a marker.
An unchanged config file is not written
MCP registration runs on every sync, sync runs at every session start, and the agent rewrites the same file, so a registration with nothing to change must not write. Two things hid one that wrote every time. The check compared text: a Codex entry parsed from the file carries the blank line above its header, so it never rendered like a freshly built one, and Goose’s section was compared with its indentation stripped against a snippet that kept it. Compare parsed values instead (toml_entry_values, yaml_values), which also leaves alone an entry the agent or the user laid out differently. And the tests compared the file’s content before and after, which a rewrite with the same bytes passes: assert on the modification time, as assert_second_registration_writes_nothing does.
Environment isolation in tests
Tests needing different environment variables should configure a subprocess with Command::env and env_remove, rather than mutating the parallel test process with std::env::set_var or remove_var. On Unix, native libraries can read the environment outside Rust’s synchronization, so serializing only the tests that write it does not establish safety. The log-directory test re-executes only its own case with the environment set before startup and checks a completion marker so an empty test filter cannot silently pass.
Windows portability (tests)
The test suite runs on windows-latest, where CI passes --no-fail-fast so that one failing test binary does not hide the failures in every binary cargo would otherwise skip. A few patterns recur when writing tests that touch paths or scripts:
- Paths in TOML/JSON string literals. A Windows path like
C:\Users\...is invalid inside a TOML or JSON string (the backslashes read as escapes). When substituting a real path into fixture text, convert to forward slashes first; Windows accepts/in paths. Seesetup_fixtureinsymposium-testlib. - Paths inside
shscript bodies. On Windowsshis git-bash’s MSYS shell, which readsC:\a\bas escapes plus an illegal:. Rewrite to the/c/a/bform and quote the value. Seesh_pathinpredicate.rstests. .shfiles must usescript, notexecutable. A shell script cannot be spawned directly as a process on Windows (no shebang support). In fixtures, reference it viascript = "..."so it is run throughsh, neverexecutable = "...".- Canonicalized paths carry a
\\?\prefix.fs::canonicalizeon Windows returns an extended-length path thatcargo’s output lacks. Canonicalize both sides before comparing. A path that will be run byshmust not carry it, since MSYS cannot open it: usedunce::canonicalize, asworkspace_pluginsdoes. - Paths inside asserted messages. A report event or error that embeds a path renders it with backslashes on Windows, so an assertion matching a
/-separated substring fails there. Normalize withreplace('\\', "/")before matching, the waynormalize_pathsdoes for snapshots. - Snapshot tests and home-abbreviated paths.
display_path(inoutput.rs) abbreviates$HOMEto~/. On Windows the test temp dir lives under$HOME, so printed config paths come out home-relative, not absolute.normalize_paths(insymposium-testlib) replaces both the absolute and the~/form; a snapshot leaking a random.tmpXXXX/path means one form was missed. Do notUPDATE_EXPECTyour way past it: that bakes the volatile temp path into the snapshot and it fails on the next run.
Capturing report events in tests
A test that asserts on ReportEvents installs a ReportLayer with tracing::subscriber::set_default, which is thread-local. tracing caches callsite interest and the global max level process-wide, recomputing both from whichever dispatchers are alive the first time a callsite is reached. Tests run in parallel, so a thread with no subscriber can reach a reporting callsite first and pin it to Interest::never() for every thread; the capturing test then drains zero events, which looks like the command reporting nothing. The failure is timing-dependent, so it shows up as a platform-specific flake rather than a reproducible failure.
install_tracing_baseline (in symposium-testlib) installs a permissive global default subscriber once per test process to keep that cache open, and a thread-local set_default still takes precedence over it. setup_fixture calls it, and so must any helper that installs its own report layer.