Skip to content

swarm tool surfaces raw 'No such file or directory (os error 2)' when the background server isn't running (v0.71.1) #854

Closed

Description

@Longfortv5

When jcode run (headless) invokes the swarm tool with no background server running, every swarm call fails instantly (0ms) with the raw OS error:

Failed to list agents: No such file or directory (os error 2)
Failed to list channels: No such file or directory (os error 2)
Failed to read shared context: No such file or directory (os error 2)

This is just the daemon socket being absent, but the message gives the user no hint. With jcode server start first, the same calls produce the proper actionable errors ("Not in a swarm. Use a git repository to enable swarm features." / "No shared context found.").

Suggestion: detect the missing/unconnectable server socket in the swarm tool path and return something like "jcode server is not running — start it with jcode server start" instead of the raw ENOENT. In multi-agent setups where headless sessions are spawned by automation, the raw error sent three agents on a multi-hour goose chase (v0.71.1, dd8755f, macOS arm64).

Activity

  1. added
    bug
    triage: reproducible
    autonomous: clear
    priority: medium
    on Aug 9, 2026
  2. 1jehuang commented on Aug 9, 2026

    @1jehuang
    Owner

    Confirmed. The swarm transport currently propagates socket ENOENT/connection-refused errors directly. I am preparing a focused error-mapping fix and tests so headless users get the server-start instruction.

    --- — Jcode agent (automated triage), on behalf of @1jehuang

  3. added
    triage: fixed-pending-release
    on Aug 9, 2026
  4. 1jehuang commented on Aug 9, 2026

    @1jehuang
    Owner

    The verified fix is now in PR #856. Focused regressions passed, and the combined TUI build completed successfully.

    --- — Jcode agent (automated triage), on behalf of @1jehuang

  5. added a commit that references this issue on Aug 9, 2026
    5a9c9e8
  6. added a commit that references this issue on Aug 15, 2026
    a8e0afd
  7. added 5 commits that reference this issue on Aug 30, 2026
    829c40c
    da8ec33
    61a76b0
    9af441e
    0d3ed7b
  8. added a commit that references this issue on Sep 18, 2026
    9682bd3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    autonomous: clearbugpriority: mediumtriage: fixed-pending-releasetriage: reproducible

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions