GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — @opencode-ai/sdk: Tools intermittently fail to load (0 tools) when using createOpencodeServer · Issue #7060 · anomalyco/opencode

@opencode-ai/sdk: Tools intermittently fail to load (0 tools) when using createOpencodeServer #7060

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
@opencode-ai/sdk: Tools intermittently fail to load (0 tools) when using createOpencodeServer#7060
Copy link
Assignees
thdxr

Description

@kevoconnell
kevoconnell
opened on Jan 6, 2026
Issue body actions

Description

When using @opencode-ai/sdk to spawn an OpenCode server programmatically via createOpencodeServer(), tools intermittently fail to load. The same deployment and code will sometimes load 120 tools successfully, and other times show 0 tools. There's no apparent pattern - it's a race condition. This might also be partly in due to the Trigger config, but thought I would flag here also.

Environment

  • OpenCode SDK version: 1.0.223
  • OpenCode server version: 1.1.3 (from health check)
  • Platform: Linux x64 (containerized environment)
  • Node version: 20.x

Steps to reproduce

  1. Use createOpencodeServer() to start the server (within a trigger.dev task)
  2. Call client.tool.ids() after server starts
  3. Run multiple times - some succeed, some fail

Logs

Successful run:

[OpenCode] Server started at http://127.0.0.1:4096
[OpenCode] Health check: {"healthy":true,"version":"1.1.3"}
[OpenCode] Listed 120 tools in 3ms
[OpenCode] Prompt completed in 4.2s

Failed run (same code, different execution):

[OpenCode] Server started at http://127.0.0.1:4096
[OpenCode] Health check: {"healthy":true,"version":"1.1.3"}
[OpenCode] Tools available immediately after start: 0
[OpenCode] Prompt completed in 0.1s

Workaround attempted

Added retry logic to poll client.tool.ids() with 300ms delays (10 attempts), but if tools don't load on first check, they never appear even after retrying.

Expected behavior

client.tool.ids() should consistently return all available tools after the server reports healthy.

Question

Is there an event or API to wait for tools to be fully indexed before querying? Or a known race condition during server startup?

Activity

  1. github-actions
    assigned
    thdxr
    on Jan 6, 2026
  2. tsenart
    added 2 commits that reference this issue on Feb 6, 2026

    Fixed your mess.

    b97baee

    Fixed your mess.

    90c577c
  3. github-actions commented on Mar 25, 2026

    @github-actions
    github-actionsBot
    on Mar 25, 2026 – with GitHub Actions
    Contributor
    More actions

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

  4. rekram1-node
    closed this as not plannedon May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @thdxr
    thdxr

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.