chorus icon indicating copy to clipboard operation
chorus copied to clipboard

Unable to use OpenCode

Open jayakornk opened this issue 6 months ago • 4 comments

# Chorus diagnose

chorus CLI:      0.8.27
running daemon:  0.8.27
node:            22.15.0
platform:        darwin (arm64, 25.3.0)
install mode:    unknown
bin path:        ~/.local/state/fnm_multishells/48386_1777973487161/bin/chorus

## Daemon state
pid alive:       true
health probe:    OK on :7707
daemon.json:
  {
    "schemaVersion": 1,
    "daemonPort": 7707,
    "cockpitPort": 5050,
    "daemonPid": 32105,
    "cockpitPid": 32107,
    "startedAt": "2026-05-08T06:25:14.026Z",
    "version": "0.8.27"
  }

## DB
chats:           5
voices:          158

## CLI detection
  ✓ claude-code    ~/.local/bin/claude
  ✓ codex-cli      ~/.local/state/fnm_multishells/48386_1777973487161/bin/codex
  ✓ gemini-cli     ~/.local/state/fnm_multishells/48386_1777973487161/bin/gemini
  ✓ opencode-cli   ~/.opencode/bin/opencode
  ✗ kimi-cli       not found

## Crashes
count:           0

## Recent daemon.log (last 50 lines)
  [daemon] voices Phase 2 (opencode): +145 added, 0 updated, 0 auto-disabled
  [daemon] templates re-adapted after Phase 2 voice seed
  [telemetry] heartbeat failed: fetch failed
  {"chatId":"019E0575D46A6C372698DCFC82AF2645","templateId":"code-review","phaseKind":"review","requestId":"req-7c","hasArtifact":false,"hasRepoPath":false,"attachedFileCount":11,"msg":"chat created","level":30,"time":1778208068717,"pid":60672,"hostname":"MacBook-Pro.local"}
  {"chatId":"019E057D1C6868B60A82766D28ADE27F","templateId":"review-only","phaseKind":"review_only","requestId":"req-ek","hasArtifact":true,"hasRepoPath":false,"attachedFileCount":0,"msg":"chat created","level":30,"time":1778208545899,"pid":60672,"hostname":"MacBook-Pro.local"}
  [reviewer] attempt failed chat=019E057D1C6868B60A82766D28ADE27F round=1 lineage=opencode model=openai/gpt-5.5 kind=cli_failed duration_ms=20 message="opencode exited 1: script: tcgetattr/ioctl: Operation not supported on socket"
  [reviewer] fallback fired chat=019E057D1C6868B60A82766D28ADE27F round=1 slot=opencode-cli-0 reason=lineage_fallback from=opencode/openai/gpt-5.5 to=anthropic/opencode/claude-sonnet-4-6 chain_idx=0
  [reviewer] attempt failed chat=019E057D1C6868B60A82766D28ADE27F round=1 lineage=opencode model=ollama-cloud/kimi-k2.6:cloud kind=cli_failed duration_ms=19 message="opencode exited 1: script: tcgetattr/ioctl: Operation not supported on socket"
  [reviewer] fallback fired chat=019E057D1C6868B60A82766D28ADE27F round=1 slot=opencode-cli-1 reason=lineage_fallback from=opencode/ollama-cloud/kimi-k2.6:cloud to=anthropic/opencode/claude-sonnet-4-6 chain_idx=0
  [reviewer] attempt failed chat=019E057D1C6868B60A82766D28ADE27F round=1 lineage=opencode model=ollama-cloud/deepseek-v4-pro kind=cli_failed duration_ms=20 message="opencode exited 1: script: tcgetattr/ioctl: Operation not supported on socket"
  [reviewer] fallback fired chat=019E057D1C6868B60A82766D28ADE27F round=1 slot=opencode-cli-2 reason=lineage_fallback from=opencode/ollama-cloud/deepseek-v4-pro to=anthropic/opencode/claude-sonnet-4-6 chain_idx=0
  [reviewer] attempt failed chat=019E057D1C6868B60A82766D28ADE27F round=1 lineage=anthropic model=opencode/claude-sonnet-4-6 kind=claude_result_error duration_ms=4380 message="Your organization has disabled Claude subscription access for Claude Code · Use an Anthropic API key instead, or ask your admin to enable access"
  [reviewer] attempt failed chat=019E057D1C6868B60A82766D28ADE27F round=1 lineage=opencode model=ollama-cloud/glm-5.1 kind=cli_failed duration_ms=5 message="opencode exited 1: script: tcgetattr/ioctl: Operation not supported on socket"
  [reviewer] fallback fired chat=019E057D1C6868B60A82766D28ADE27F round=1 slot=opencode-cli-3 reason=lineage_fallback from=opencode/ollama-cloud/glm-5.1 to=anthropic/opencode/claude-sonnet-4-6 chain_idx=0
  [reviewer] attempt failed chat=019E057D1C6868B60A82766D28ADE27F round=1 lineage=anthropic model=opencode/claude-sonnet-4-6 kind=claude_result_error duration_ms=4425 message="Your organization has disabled Claude subscription access for Claude Code · Use an Anthropic API key instead, or ask your admin to enable access"
  [reviewer] attempt failed chat=019E057D1C6868B60A82766D28ADE27F round=1 lineage=opencode model=opencode/qwen3.6-plus kind=cli_failed duration_ms=5 message="opencode exited 1: script: tcgetattr/ioctl: Operation not supported on socket"
  [reviewer] fallback fired chat=019E057D1C6868B60A82766D28ADE27F round=1 slot=opencode-cli-4 reason=lineage_fallback from=opencode/opencode/qwen3.6-plus to=anthropic/opencode/claude-sonnet-4-6 chain_idx=0
  [reviewer] attempt failed chat=019E057D1C6868B60A82766D28ADE27F round=1 lineage=anthropic model=opencode/claude-sonnet-4-6 kind=claude_result_error duration_ms=4745 message="Your organization has disabled Claude subscription access for Claude Code · Use an Anthropic API key instead, or ask your admin to enable access"
  [reviewer] attempt failed chat=019E057D1C6868B60A82766D28ADE27F round=1 lineage=opencode model=opencode/claude-sonnet-4-6 kind=cli_failed duration_ms=8 message="opencode exited 1: script: tcgetattr/ioctl: Operation not supported on socket"
  [reviewer] fallback fired chat=019E057D1C6868B60A82766D28ADE27F round=1 slot=opencode-cli-5 reason=lineage_fallback from=opencode/opencode/claude-sonnet-4-6 to=anthropic/opencode/claude-sonnet-4-6 chain_idx=0
  [reviewer] attempt failed chat=019E057D1C6868B60A82766D28ADE27F round=1 lineage=anthropic model=opencode/claude-sonnet-4-6 kind=claude_result_error duration_ms=3451 message="Your organization has disabled Claude subscription access for Claude Code · Use an Anthropic API key instead, or ask your admin to enable access"
  [reviewer] attempt failed chat=019E057D1C6868B60A82766D28ADE27F round=1 lineage=anthropic model=opencode/claude-sonnet-4-6 kind=claude_result_error duration_ms=3571 message="Your organization has disabled Claude subscription access for Claude Code · Use an Anthropic API key instead, or ask your admin to enable access"
  [reviewer] attempt failed chat=019E057D1C6868B60A82766D28ADE27F round=1 lineage=anthropic model=opencode/claude-sonnet-4-6 kind=claude_result_error duration_ms=3459 message="Your organization has disabled Claude subscription access for Claude Code · Use an Anthropic API key instead, or ask your admin to enable access"
  [daemon] seeded 10 built-in personas
  [daemon] runtime PATH primed (42 dirs)
  [daemon] voices Phase 1: +0 added, 13 updated, 0 auto-disabled
  [daemon] refreshed builtin template: architect-review
  [daemon] refreshed builtin template: bug-diagnose
  [daemon] refreshed builtin template: code-review
  [daemon] refreshed builtin template: red-green
  [daemon] refreshed builtin template: tri-review
  {"port":7707,"host":"127.0.0.1","version":"0.8.26","msg":"daemon listening","level":30,"time":1778221430246,"pid":28449,"hostname":"MacBook-Pro.local"}
  Chorus daemon listening on http://127.0.0.1:7707
  [daemon] voices Phase 2 (opencode): +0 added, 145 updated, 0 auto-disabled
  [daemon] templates re-adapted after Phase 2 voice seed
  [daemon] seeded 10 built-in personas
  [daemon] runtime PATH primed (42 dirs)
  [daemon] voices Phase 1: +0 added, 13 updated, 0 auto-disabled
  {"port":7707,"host":"127.0.0.1","version":"0.8.27","msg":"daemon listening","level":30,"time":1778221513940,"pid":32105,"hostname":"MacBook-Pro.local"}
  Chorus daemon listening on http://127.0.0.1:7707
  [daemon] voices Phase 2 (opencode): +0 added, 145 updated, 0 auto-disabled
  [daemon] templates re-adapted after Phase 2 voice seed
  {"chatId":"019E0649762D8D591A7C1D51A215B5F3","templateId":"review-only","phaseKind":"review_only","requestId":"req-1e","hasArtifact":true,"hasRepoPath":false,"attachedFileCount":0,"msg":"chat created","level":30,"time":1778221938224,"pid":32105,"hostname":"MacBook-Pro.local"}
  [reviewer] attempt failed chat=019E0649762D8D591A7C1D51A215B5F3 round=1 lineage=opencode model=openai/gpt-5.5 kind=cli_failed duration_ms=13 message="opencode exited 1: script: tcgetattr/ioctl: Operation not supported on socket"
  [reviewer] attempt failed chat=019E0649762D8D591A7C1D51A215B5F3 round=1 lineage=opencode model=ollama-cloud/kimi-k2.6:cloud kind=cli_failed duration_ms=11 message="opencode exited 1: script: tcgetattr/ioctl: Operation not supported on socket"
  [reviewer] attempt failed chat=019E0649762D8D591A7C1D51A215B5F3 round=1 lineage=opencode model=ollama-cloud/deepseek-v4-pro kind=cli_failed duration_ms=13 message="opencode exited 1: script: tcgetattr/ioctl: Operation not supported on socket"
  [reviewer] attempt failed chat=019E0649762D8D591A7C1D51A215B5F3 round=1 lineage=opencode model=ollama-cloud/glm-5.1 kind=cli_failed duration_ms=11 message="opencode exited 1: script: tcgetattr/ioctl: Operation not supported on socket"
  [reviewer] attempt failed chat=019E0649762D8D591A7C1D51A215B5F3 round=1 lineage=opencode model=opencode/qwen3.6-plus kind=cli_failed duration_ms=9 message="opencode exited 1: script: tcgetattr/ioctl: Operation not supported on socket"
  [reviewer] attempt failed chat=019E0649762D8D591A7C1D51A215B5F3 round=1 lineage=opencode model=opencode/claude-sonnet-4-6 kind=cli_failed duration_ms=6 message="opencode exited 1: script: tcgetattr/ioctl: Operation not supported on socket"

## Recent web.log (last 20 lines)
  ▲ Next.js 16.2.4
  - Local:         http://127.0.0.1:5050
  - Network:       http://127.0.0.1:5050
  ✓ Ready in 125ms
  ⨯ Error: failed to pipe response
      at ignore-listed frames {
    [cause]: TypeError: terminated
        at ignore-listed frames {
      [cause]: Error [SocketError]: other side closed
          at ignore-listed frames {
        code: 'UND_ERR_SOCKET',
        socket: [Object]
      }
    }
  }
  ▲ Next.js 16.2.4
  - Local:         http://127.0.0.1:5050
  - Network:       http://127.0.0.1:5050
  ✓ Ready in 99ms

jayakornk avatar May 08 '26 06:05 jayakornk

Hi @jayakornk — your diagnose block shows a healthy daemon (✓), opencode CLI detected at ~/.opencode/bin/opencode, and 158 voices in the DB. So the chorus side looks fine.

Could you describe what specifically happens when you try to use OpenCode? E.g.:

  • Selected an opencode model in a template, ran it, what error/output?
  • The opencode CLI failing on opencode --version?
  • Reviewer card stuck in a particular state?
  • Any errors in the Recent daemon.log section of chorus diagnose when you try?

The bug report needs the failure mode to be reproducible — diagnose tells us what's healthy, but we need to see what's broken.

chorus-codes avatar May 09 '26 08:05 chorus-codes

Screenshot

Image

OpenCode

❯ opencode --version
1.14.46

Chorus Template config (Review Only - v0.8.27)

id: review-only
name: Review Only
description: |
  Paste a diff, draft, or text blob. Six reviewers (Codex + Gemini + Claude
  + opencode-go Kimi + opencode-go DeepSeek + opencode-go Qwen) critique it
  independently. Single pass — revise yourself and resubmit for another round.
author: chorus
agreementThreshold: 0.66
onThresholdMet: ask
maxRounds: 1
yoloDefault: false
phases:
  - id: review
    kind: review_only
    title: External Review
    description: Five lineages critique the supplied artifact independently.
    reviewer:
      require: 2
      crossLineage: true
      candidates:
        - lineage: opencode
          models:
            - openai/gpt-5.5
        - lineage: opencode
          models:
            - ollama-cloud/kimi-k2.6:cloud
        - lineage: opencode
          models:
            - ollama-cloud/deepseek-v4-pro
        - lineage: opencode
          models:
            - ollama-cloud/glm-5.1
        - lineage: opencode
          models:
            - opencode/qwen3.6-plus
        - lineage: opencode
          models:
            - opencode/claude-sonnet-4-6
    inputs:
      include: []
      exclude: []
    artifact:
      label: Artifact to review
      hint: Paste a unified diff, a markdown draft, code, or any text blob.
      maxBytes: 1048576
fallback:
  reviewer:
    - lineage: opencode
      models:
        - opencode/claude-sonnet-4-6

I only changed models in review-only.yaml template file from claude to opencode. Daemon seems to be ok. I just can't get the models to do the work. I do not have opencode-go subscription by the way.

jayakornk avatar May 10 '26 07:05 jayakornk

Thanks for the screenshot and template — that pinpoints it. Without an opencode-go subscription, all four lineage: opencode slots in your template route to gateway models you don't have access to:

  • ollama-cloud/kimi-k2.6:cloud, ollama-cloud/deepseek-v4-pro, ollama-cloud/glm-5.1 — these are opencode-go gateway models (paid subscription).
  • opencode/qwen3.6-plus — also routed via opencode-go.
  • openai/gpt-5.5 under lineage: opencode — needs an OpenAI API key configured inside opencode auth. If you haven't set one, this fails.
  • opencode/claude-sonnet-4-6 — works only if opencode auth login has been completed for Anthropic; chorus can't authenticate the underlying CLI for you.

Two paths forward, pick whichever fits:

Easiest — use Claude Code directly (you already have it on PATH, no extra auth):

reviewer:
  require: 2
  crossLineage: true
  candidates:
    - lineage: anthropic
      models:
        - claude-sonnet-4-6
    - lineage: anthropic
      models:
        - claude-haiku-4-5

That gives you a 2-slot Claude-only review using your Claude Code subscription. You can keep crossLineage: true if you add a second non-Claude lineage; with only one lineage available, set crossLineage: false and require: 2.

If you want multi-lineage diversity for free — install one more CLI (codex or gemini), then mix lineages:

candidates:
  - lineage: anthropic   # claude-code subscription
    models: [claude-sonnet-4-6]
  - lineage: openai      # codex subscription
    models: [gpt-5.5]
  - lineage: google      # gemini-cli (free tier works)
    models: [gemini-2.5-pro]

chorus connect will wire whichever CLIs you have detected. Run chorus diagnose afterward — the new CLI smoke section in v0.8.32 will tell you immediately if <bin> --version is failing for any of them.

Re-running the same template on opencode without a subscription would also produce a friendlier error in v0.8.32 (the new Recent failed chats section in chorus diagnose shows the per-participant errorKind from _attempts.jsonl). If you upgrade — npm install -g chorus-codes@latest && chorus stop && chorus start — and the issue still persists, paste a fresh diagnose block and we'll go from there.

99xAgency avatar May 10 '26 11:05 99xAgency

Closing this out — it's been ~4 days with no follow-up and the diagnosis was clear: without an opencode-go subscription, the four lineage: opencode slots in your template route to gateway models you don't have access to.

If you do have opencode-go set up and this is still happening, please open a fresh issue with a current diagnose block (chorus diagnose) so we can look at your actual voice/lineage state. Thanks for the report.

99xAgency avatar May 14 '26 07:05 99xAgency