skills-init: commit-SHA skill refs never start (git checkout -- <sha> reads the SHA as a pathspec)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 84/100
Research direction
Read go/core/internal/skillsinit/git.go, focusing on CloneGit and its Full ref checkout path. The issue gives a minimal plain Git reproduction; confirm how the checkout arguments are passed, then inspect nearby tests for this behavior. Done when commit SHA refs check out successfully on the 0.10 line and branch and tag refs still work.
Written by the indexing model from the issue text.
Description
What happens
An agent whose skills pin a commit SHA never leaves Init. skills-init fails with:
error: pathspec '<sha>' did not match any file(s) known to git
skills-init: clone <url>: exit status 1
Agents that pin a branch or tag are fine.
Why
CloneGit in go/core/internal/skillsinit/git.go takes the Full path for a commit SHA and runs:
if err := runGitIn(ref.Dest, "checkout", "--", ref.Ref); err != nil {
With the -- separator, git treats everything after it as a pathspec, not a revision. So the SHA is looked up as a file name and the checkout fails. The commit is present in the clone; only the argument parsing is wrong.
The comment above the call says the separator is there so "a ref starting with -" cannot be parsed as a flag, and notes that refs are already validated as 40-char hex when Full is true. That validation is real — the controller sets Full from isCommitSHA, which is ^[0-9a-fA-F]{40}$ — so a 40-character hex string can never be an option and the separator protects nothing.
Minimal reproduction
No kagent needed; this is plain git:
git clone https://github.com/<any>/<repo>.git /tmp/r
cd /tmp/r
git checkout -- "$(git rev-parse HEAD)" # error: pathspec ... did not match any file(s) known to git
git checkout "$(git rev-parse HEAD)" # works
Fix
Drop the separator:
if err := runGitIn(ref.Dest, "checkout", ref.Ref); err != nil {
git checkout <sha> -- (separator last) also works, but the plain form is what the surrounding comment already describes.
Versions
Present in v0.10.4, v0.10.5 and v0.10.6 — the same line in all three.
Already fixed on main / v1.0.0-rc3, where CloneGit was rewritten to git fetch --depth 1 origin <commit> followed by git checkout --detach FETCH_HEAD. So this only affects the 0.10 line.
Impact
Any agent using skills.gitRefs with a commit SHA — which is the recommended way to pin skills — cannot start on 0.10.x. Branch and tag refs are unaffected.
- Dominant language
- Go
- Stars
- 4.1k
- Forks
- 871
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 183
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from kagent-dev/kagent
-
Gemini catalogs omit gemini-4-argon and gemini-3.8-flashPossibly taken @jayunit100 claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
kagent-dev/kagent#3524 · 1 comment ·
Maintainers usually reply within 1 day
-
Don't add the provider's public host to egress when a ModelConfig sets baseUrlPossibly taken @lakshyab20 claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 81/100
kagent-dev/kagent#3507 · 1 comment ·
Maintainers usually reply within 1 day
-
[BUG] OpenAI and Ollama adapters send an empty tool message when a tool returns a dictPossibly taken @helloxjade claimed this 6 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
kagent-dev/kagent#3462 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
kagent-dev/kagent#3428 · 1 comment ·
Maintainers usually reply within 1 day
-
[BUG]Possibly taken @helloxjade claimed this 10 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
kagent-dev/kagent#3385 · 1 comment ·
Maintainers usually reply within 1 day
All issues in kagent-dev/kagent
Similar issues
-
agent-butler-finding chore
Difficulty 1/5 Under an hour Newbie friendliness 88/100
jordansmall/spindrift#6695 ·
Maintainers usually reply within 1 day
-
book-layout.spec fails when the similar-books rail holds other projects' booksPossibly taken @praetorianer777 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
praetorianer777/GoTome#373 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
-
/shutdown/ready can fail to return an HTTP response when readiness takes longer than the server write timeoutPossibly taken @floriankoch claimed this today. Opentriage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
envoyproxy/gateway#10562 ·
Maintainers usually reply within 1 day
-
Adding an LDAP group reports every search failure as "LDAP Group DN is not found"Possibly taken @Daksha1611 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day