hermes - 💡(How to fix) Fix [Feature] Native Qwen Code ACP integration (like Copilot CLI)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Error handling notification {

Code Example

{"method": "initialize", "params": {"protocolVersion": "1.0.0"}}

---

Error handling notification {
  jsonrpc: '2.0',
  method: 'initialize'
}
{"code": -32601, "message": '"Method not found': initialize'}

---

cd ~/llama-vram-dashboard && qwen -y "revue de dashboard.py"

---

echo '{"jsonrpc":"2.0","method":"initialize"}' | qwen --acp --bare
# Retourne: {"code": -32601, "message": '"Method not found': initialize'}

---

def _detect_acp_type(self):
    cmd = self.command if isinstance(self.command, list) else []
    if '--bare' in cmd:
        return 'qwen-code'
    return 'copilot'
RAW_BUFFERClick to expand / collapse

🚀 Feature: Intégration native de Qwen Code ACP

Contexte

Hermes Agent supporte nativement l'ACP via acp_command="copilot" qui utilise le protocole JSON-RPC de GitHub Copilot CLI (--acp --stdio).

Qwen Code v0.15.8 supporte aussi son propre mode ACP (qwen --acp --bare) mais avec un protocole différent — pas de méthode initialize.

Problème actuel

Quand on lance un subagent avec acp_command="qwen", Hermes envoie un handshake JSON-RPC :

{"method": "initialize", "params": {"protocolVersion": "1.0.0"}}

Qwen Code rejette cette méthode :

Error handling notification {
  jsonrpc: '2.0',
  method: 'initialize'
}
{"code": -32601, "message": '"Method not found': initialize'}

Résultat : le subagent fallback sur le modèle local.

Preuve de concept

Qwen Code fonctionne parfaitement en mode headless terminal :

cd ~/llama-vram-dashboard && qwen -y "revue de dashboard.py"

→ Sortie structurée retournée avec exit_code 0.

Le seul problème est l'ACP non compatible.

Test du protocole Qwen Code ACP

echo '{"jsonrpc":"2.0","method":"initialize"}' | qwen --acp --bare
# Retourne: {"code": -32601, "message": '"Method not found': initialize'}

Qwen Code accepte --acp mais n'utilise pas le même handshake que Copilot CLI.

Solution proposée

Option A : Détecteur de type ACP (recommandé)

Dans copilot_acp_client.py, ajouter une détection automatique :

def _detect_acp_type(self):
    cmd = self.command if isinstance(self.command, list) else []
    if '--bare' in cmd:
        return 'qwen-code'
    return 'copilot'

Adapter le handshake selon le type détecté.

Option B : Wrapper de compatibilité

Créer qwen_acp_bridge.py qui traduit le handshake JSON-RPC → format Qwen Code.

Avantages

  • Permet d'utiliser Qwen Code comme agent subagent (comme Copilot)
  • Exploite les capacités de code review, edit, shell de Qwen Code
  • Compatible avec les flags -y, --approval-mode, etc.
  • Version stable : v0.15.8 installée via Homebrew

À faire

  1. Documenter le protocole ACP exact de Qwen Code v0.15.x (échanger messages avec qwen --acp --bare)
  2. Ajouter un détecteur de type ACP dans copilot_acp_client.py
  3. Adapter le handshake selon le type détecté
  4. Tests end-to-end avec subagent ACP

Environnement testé

  • Hermes Agent: local checkout (~/.hermes/hermes-agent)
  • Qwen Code: v0.15.8 (Homebrew)
  • OS: Ubuntu WSL2
  • Modèle local: Qwen3.6-35B-A3B-MoE via llama.cpp (fallback ACP)

Créé par Seb — utilisateur Hermes Agent, setup Qwen Code + local LLM

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING