Skip to content

[Self-hosting]: Task sessions hang indefinitely at session creation — reproducible on v0.4.2 and v0.5.0, opencode 1.17.8 and 1.18.1 #379

Description

@oom-ruben

Preflight

  • I searched existing issues and docs before opening this.
  • I removed secrets, tokens, private keys, customer data, and private repository details from logs and screenshots.
  • I included the exact command, service, or upgrade step that failed.

Summary

Summary:** Every task run (both standard and scan kinds, via the onboarding/environment-setup flow) hangs indefinitely right after opencode-server finishes bootstrapping. No error, no output, zero CPU, zero network activity — the process is just silently stuck. GET /doc on the opencode server responds instantly; GET /session hangs forever with 0 bytes.

Repro steps:

  1. Fresh self-hosted install, complete GitHub App + OpenRouter setup
  2. Start the first environment/task from the setup wizard
  3. Worker container spawns, clones the repo, opencode-server starts, bootstraps, fetches models.dev + provider catalog successfully
  4. githubTokenRefresh completes
  5. Nothing further happens — curl http://127.0.0.1:<port>/session inside the container times out with 0 bytes; /doc responds fine
  6. Task run never produces first_assistant_output_at, stays running until manually canceled

Problem area

Worker or controller, Fresh install

Installation method

Docker Compose

Roomote version

v0.5.0

Previous version

v0.4.2

Environment

  • Self-hosted via curl -fsSL https://get.roomote.dev | bash --domain <local-ip>, Multipass VM, Docker Compose, compute provider: Docker
  • Reproduced on both v0.4.2 and v0.5.0 (upgraded via roomote upgrade v0.5.0)
  • Reproduced on both bundled opencode 1.17.8 and manually-pinned 1.18.1 (via ROOMOTE_BAKED_OPENCODE_CLI_VERSION)
  • Reproduced across two different models (openrouter/anthropic/claude-sonnet-5, openrouter/openai/gpt-5.6-terra)
  • Network health confirmed clean at time of hang (no packet loss, no stuck TCP connections) — ruled out as cause
  • Source-control provider: GitHub App, private repo

Command or upgrade path

curl -fsSL https://get.roomote.dev | bash -s -- --domain <local-ip>
# later:
roomote upgrade v0.5.0
# then: start the first environment/task from the setup wizard

Expected behavior

After the worker spawns, clones the repo, and opencode-server finishes bootstrapping, the task should proceed to actually start the session, send the initial prompt to the model, and begin producing output (first_assistant_output_at gets set, task transcript shows activity).

Actual behavior

The task hangs indefinitely right after bootstrap — no error, no further log lines, zero CPU, zero network activity inside the worker container. GET /doc on the local opencode-server responds instantly, but GET /session never returns (times out with 0 bytes). The task run stays in running status forever with first_assistant_output_at never set, until manually canceled. Reproduced identically across two Roomote versions (v0.4.2, v0.5.0) and two opencode CLI versions (1.17.8, 1.18.1).

Diagnostics output

No response

Logs

[INFO] Prepared OpenCode config overlayDir=.../opencode workspace=/sandbox/repos mcpServers=1 model=openrouter/anthropic/claude-sonnet-5
[INFO] [opencode-server] Launching OpenCode server command=opencode args=["serve","--hostname","127.0.0.1","--port","<port>","--print-logs","--log-level","INFO"]
[INFO] [opencode-server:stdout] opencode server listening on http://127.0.0.1:<port>
[INFO] [opencode-server] OpenCode server harness connected baseUrl=http://127.0.0.1:<port> sessionId=none
[LOG] [runTask] Sandbox server started on port 4200
[INFO] [runTask] Initial input: promptChars=846 imageCount=0 harnessSessionId=none
[INFO] [HarnessManager#startNewTask] Starting new task
[INFO] [HarnessManager] Phase: idle -> running
[INFO] [githubTokenRefresh] Refreshing source control token for task run #N
[INFO] [opencode-server:stderr] message="creating instance" directory=/sandbox/repos
[INFO] [opencode-server:stderr] message=bootstrapping directory=/sandbox/repos
[INFO] [githubTokenRefresh] Refreshed github token for task run #N (source=app, nextRefreshAt=...)

--- nothing further, forever ---

$ curl --max-time 3 http://127.0.0.1:<port>/doc -o /dev/null -w '%{http_code}\n'
200

$ curl --max-time 3 http://127.0.0.1:<port>/session -o /dev/null -w '%{http_code}\n'
curl: (28) Operation timed out after 3005 milliseconds with 0 bytes received

Workarounds tried

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions