github / github/copilot-cli

`skill` tool intermittently fails in headless `-p` mode: "No model-invocable skills available"

Ouverte
#4,838 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

triage
Langage dominant
Shell
Étoiles
11.2k
Forks
1.9k
Merge moyen
14 h 16 min
PR mergées (30 j)
6

Description

Describe the bug

In headless ( copilot -p ... ) mode, the skill tool intermittently fails to resolve a skill that is simultaneously listed — with full name and description — in that same request's  <available_skills>  system-prompt block. The error is not "skill X not found among Y available skills" but the more absolute:

Skill "" not found. No model-invocable skills available.

This indicates the tool-call-time invocable-skill registry is empty even though prompt-construction-time skill discovery succeeded moments earlier in the same process. Failures are intermittent — the same skill succeeds on some invocations and fails on others — and once a failure occurs, subsequent headless invocations (different skills, 6–90s spacing, with/without  --available-tools=skill ) keep failing for an extended window (minutes to, in one earlier observation, ~2 days) before recovering. Interactive-mode invocations of the same skills, same environment, succeeded reliably throughout.

Not explained by skill symlink type (tested both relative and absolute symlink targets under  ~/.copilot/skills  — both fail identically once in a bad window), and the skill has no  disable-model-invocation / allow_implicit_invocation: false  policy set.

Prior art checked, not duplicates: #4438 and #4451 (skills excluded via  disable-model-invocation  policy — not applicable here), #4401 ( ~/.agents/skills  unsupported discovery path — our skills are under the supported  ~/.copilot/skills ).

Affected version

1.0.83

Steps to reproduce the behavior
  1. Install a user-level skill at  ~/.copilot/skills//SKILL.md  (supported path, no  disable-model-invocation  policy).
  2. Run:
    copilot -p "Use the skill tool to load the skill named and report the first 6 words of its description." --no-ask-user --log-level debug --log-dir /tmp/debug
  3. Repeat several times in quick succession (some spaced 6–90s apart).
  4. Inspect  /tmp/debug/process-*.log : the system prompt sent to the model correctly contains the skill under  <available_skills> , but the tool-call response for that same skill name is:
    Skill "" not found. No model-invocable skills available.
Expected behavior

The invocable-skill registry checked at tool-call time should stay consistent with the skill listing rendered into the system prompt for the same request — a correctly installed, policy-unrestricted, supported-path skill should not intermittently disappear from resolution.

Additional context

• OS: macOS (darwin-arm64)
• Only reproduces in headless  -p  mode; interactive mode is unaffected
• Impact: automation/headless workflows depending on the  skill  tool cannot assume it will resolve, even for a correctly installed skill

Reproduced in a fully isolated  COPILOT_HOME  profile (no custom hooks, no pre-existing skills/config/logs) with a single freshly created test skill — ruling out any local configuration, hook, or skill-content cause.

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par reproduire le problème avec ~/.copilot/skills//SKILL.md en utilisant la commande copilot -p documentée et --log-dir /tmp/debug. Comparez le bloc de system-prompt <available_skills> avec les résultats des appels d’outils dans /tmp/debug/process-*.log ; le travail est terminé lorsque les Skills pris en charge et sans restriction de policy sont résolus de manière cohérente lors d’invocations headless répétées.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
shell
Domaine
cli
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
Active
Clarté
Plutôt claire
Accessibilité débutants
48/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.