Skip to content

muse-proxy: exec fallback path has no turn deadline — a hung muse exec child hangs the request forever #2159

Closed

Description

@dezren39

Problem

bin/muse-proxy.mjs's exec (cold) path has no turn deadline. When the warm MSP path is disabled (MUSE_PROXY_WARM=0) or a request falls back to exec, the handler spawns muse exec (bin/muse-proxy.mjs:979) and the HTTP response is completed only from the child's close handler (:1083). There is no timer on this path: the only kill is on client disconnect (res.on('close') → child.kill('SIGTERM'), :992-996). If the spawned muse exec child hangs — alive but never emitting a terminal event (upstream stall, a CLI waiting on input the proxy never sends, a wedged run) — and the client is a patient programmatic caller (an OpenCode session, a queue worker), the request hangs forever and the child accumulates.

Every sibling path is bounded, including in this same file:

  • The warm path in this file: WARM_TURN_TIMEOUT_MS = 300 * 1000 (:300), applied per turn (:585-587); MSP rpc() defaults to a 30s timeout (:513-519); even the --help capability probe kills its child after 10s (:216-219).
  • bin/claude-code-proxy.mjs: TURN_TIMEOUT_MS = 300 * 1000 (:55) on its spawned turns, with SIGKILL escalation (:480).
  • bin/codex-proxy.mjs's app-server path: 10s connect / 30s RPC timeouts (its exec path has the same defect as this one and is filed separately this run).

The exec path is the fallback taken exactly when the bounded warm path is unavailable or has failed — the moment a hang is most likely — and it is the one path with no bound.

Evidence (verified this run, main b2b885b9)

Sandbox probe with a fake muse binary ($HOME/.local/bin/muse under a scratch HOME; the fake answers --help probes with a flags line and sleeps 60s for any other invocation), MUSE_PROXY_WARM=0:

  • Proxy log: CLI probe: exec advertises 6 flags... then Spawning: .../muse exec --json --prompt-file ... --model muse-spark-1.3 --reasoning-effort low --user-input-auto-resolve --approval-mode never — the request reached the exec spawn at :979.
  • curl -X POST /v1/chat/completions (non-streaming): no response after 8s (curl killed by timeout 8, exit 124, 0 response bytes) while the fake child (sleep 60) was still running. Nothing in the proxy would have ended the request before the child's own exit — and a truly hung child never exits.

Dedup: gh searches for muse-proxy timeout and muse-proxy hang (open + closed) return no covering issue. Adjacent but distinct: #2097/#2100/#2102 are the same no-timeout class in design-code-proxy, clef-proxy, and antigravity-ls-proxy (HTTP fetch / RPC paths in other files); the codex-proxy exec path is filed separately this run.

Why it matters

This proxy is the only door from OpenCode sessions into the Meta pool (see the pool map in ~/hatch-personal/AGENTS.md), so a wedged exec turn stalls the session routed through it with no error, no log line, and no recovery short of the client dying — at which point the accumulated child is killed only as a side effect of the disconnect. A bounded fallback would surface the same stall as a prompt, actionable error, consistent with how the warm path already behaves at 300s.

Acceptance criteria

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Oct 29, 2026
  2. developing-today commented on Oct 29, 2026

    @developing-today
    Contributor
  3. added
    source/creatorFiled by the new-issue-creator job
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued task in the Supabase agent queue
    effort/sSmall: expected under 2 hours of work
    app/muse-proxybin/muse-proxy.mjs OpenAI-compatible Muse bridge
    on Oct 29, 2026
  4. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed

  5. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 1, 2026
  6. 107 remaining items

  7. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  8. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked

  9. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up + parked (queue task 5196, repo-worker-code, OpenChamber scheduled lane)

  10. added
    queue/claimedQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 2, 2026
  11. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  12. added 2 commits that reference this issue on Nov 2, 2026
  13. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

app/muse-proxybin/muse-proxy.mjs OpenAI-compatible Muse bridgeeffort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobtask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions