Repository navigation
Description
Problem
Agents synced through an agent target extension are always reported as out of sync. skillshare status shows 0/2 for the target, status --json reports "linked": 0, "drift": true, and the agents stay listed as pending in the Web UI Sync tab. Running sync again (also with force) does not change this.
The sync itself works: the converted files are written correctly, and their hashes match .skillshare-manifest.json. Only the status count is wrong.
Reproduction
skillshare v0.24.3, macOS.
-
Two agents in
~/.config/skillshare/agents/:reviewer.mdandsvelte-file-editor.md. -
A target with an agent extension. The extension is a copy of the reference
extensions/codex-agentswith an extra field mapping;output_ext: tomlis unchanged.targets: codex: skills: path: ~/.codex/skills enabled: false agents: path: ~/.codex/agents extension: codex-agents-mapped
-
skillshare sync agents:✓ codex 2 copied ✓ Synced 2 agents to 2 targets -
~/.codex/agents/now containsreviewer.toml,svelte-file-editor.tomland.skillshare-manifest.json. The manifest tracksreviewer.tomlandsvelte-file-editor.toml, and the SHA-256 of both files matches the manifest. -
skillshare status:Targets skills agents codex ~/.codex/skills skills off ! 0/2skillshare status --json:{ "name": "codex", "path": "/Users/me/.codex/agents", "expected": 2, "linked": 0, "drift": true }
Expected
2/2, "drift": false, and nothing pending in the Sync tab once the converted files are up to date.
Cause
SyncedAgentCopies looks for the copy under the source file name and compares it byte for byte with the source — internal/sync/agent_sync.go:270-288:
if _, tracked := copies.m.Managed[a.FlatName]; !tracked { // looks up "reviewer.md"
...
target := filepath.Join(targetDir, a.FlatName) // expects <target>/reviewer.md
if ... contentEqual(a.AbsPath, target) { // expects source contentWith an extension, the file is written under output_ext (reviewer.toml), the manifest key is reviewer.toml, and the content is the converted output. So none of the three checks can match, and every extension-converted agent counts as missing.
The same function feeds the agent count in:
skillshare status—cmd/skillshare/status_agents.go:65-67, drift at line 56doctor—cmd/skillshare/doctor_agents.go:76- target summary —
internal/targetsummary/agents.go:150
From the code, this should affect every agent extension that changes the file name or content, including the built-in codex-agents and opencode-agents. I only reproduced it with my copy of codex-agents.
Possible fix
For targets with an extension, count an agent as synced when the manifest tracks <stem>.<output_ext> and the file's hash matches the manifest entry, instead of comparing against the source file.
Activity
runkids commentedon Oct 4, 2026
Thanks for the detailed report and the pointer to
SyncedAgentCopies, that was exactly it.Fix is in #392: for a target with an
extension, an agent now counts as synced when the manifest tracks its converted output and the file still matches the recorded hash, sostatus,doctorand the Sync tab report2/2after a sync. It affects the built-incodex-agentsandopencode-agentstoo, as you suspected.It will go out in the next patch release. I'll post here once it is published so you can confirm on your setup.
fix(status): report drift when an extension agent's source changed
runkids commentedon Oct 5, 2026
@danscheer The fix is now available in v0.24.5.
Could you update and confirm that
status,doctorand the Sync tab no longer report drift for the converted agents on your setup?danscheer commentedon Oct 5, 2026
That was fast, thanks! I updated to v0.24.5 and
status,status --json("linked": 2, "drift": false) anddoctor(2/2 linked) all look right now.One spot still seems to be missing it: the Sync tab keeps listing both agents as pending.
skillshare diffshows the same thing:and
GET /api/diffreturns{"skill":"reviewer.md","action":"link","reason":"source only","kind":"agent"}for both agents.From a quick look,
computeAgentTargetDiff(internal/server/handler_agent_diff.go) andcomputeAgentDiff(cmd/skillshare/diff_agents.go) still only scan for*.mdfiles under the source name. So they miss the extension'soutput_extand the manifest that #392 now checks inSyncedAgentCopies.Happy to test again once that's in.
fix(diff): compare extension agent outputs and apply target filters (#…
runkids commentedon Oct 5, 2026
@danscheer Thanks for the follow-up, the Sync tab and
skillshare diffwere still missing it. That is fixed in v0.24.6: both now treat a converted agent as synced after a sync, list it again when the source changes, and follow the target's include/exclude.Could you update and confirm that
skillshare diffand the Sync tab no longer list the two agents on your setup?danscheer commentedon Oct 5, 2026
Updated to v0.24.6 and everything checks out:
skillshare diffno longer listsreviewer.md/svelte-file-editor.mdfor codexstatusanddoctorstill report2/2Thanks for the quick turnaround on both fixes!
fix(status): count extension-converted agents as synced