Skip to content

Plan usage never observes muse: muse serve 1.4.24 rejects requests without jsonrpc, and usage/read returns empty #2306

Closed

Description

@JacobStephens2

This was generated by AI during triage.

Agent Brief

Category: bug
Summary: Plan usage never observes muse. Muse Code 1.4.24's muse serve rejects thirdshift's JSON-RPC requests because they lack "jsonrpc":"2.0". With that field added, usage/read returns an empty result. So routing can't see an exhausted muse window and keeps starting muse sessions until one fails.

Current behavior:

On 2026-11-19 (thirdshift 0.38.0, Muse Code 1.4.24-R9131.1), every machine's Plan usage showed muse … nothing observed yet, including the Console and thirdshift plan-usage on factory and lima-thirdshift. At the same moment, muse's interactive /usage showed Current 103% used · Resets at 11:31 AM and Weekly 34% used · Resets Nov 22 at 7:00 PM.

plan_usage::read::muse (src/plan_usage/read.rs) sends initialize, initialized, usage/read and account/read to muse serve, one per line and deliberately without the jsonrpc member (see the rpc doc comment). Replaying those exact lines against muse serve on factory returned, for every request:

{"error":{"code":-32600,"data":{"kind":"invalidRequest"},"message":"missing or invalid jsonrpc member"},"id":1,"jsonrpc":"2.0"}

With "jsonrpc":"2.0" added to each request, initialize succeeded but usage/read returned {"id":1,"jsonrpc":"2.0","result":{}}, with no usage object. So the method may have been renamed or may need params, or the usage may be available only after a model call.

Desired behavior:

  • thirdshift's muse read works against Muse Code ≥ 1.4.24: each request carries "jsonrpc":"2.0" (check that Codex's app-server still accepts that, or add the field only for muse), and it uses whatever method or params muse serve now documents for usage and account reads.
  • When the read returns errors or an empty result, Plan usage says so: for example muse: usage read failed: <message> on the Console and in thirdshift plan-usage, rather than nothing observed yet.

Key interfaces:

  • rpc, muse and take_muse in src/plan_usage/read.rs.
  • Muse Code's muse serve protocol, from its official docs or muse serve --help. Use only documented methods, per the guide's rule against undocumented endpoints.

Acceptance criteria:

  • Against Muse Code 1.4.24, thirdshift plan-usage shows muse's five-hour and weekly windows with reset times.
  • A muse window at or over 100% puts the muse route in cooldown before a session is started.
  • A failed or empty read is shown as such, with fake-gh/fake-CLI tests for the error, empty and populated responses.
  • The Codex read still works, with its tests passing.

Out of scope:

  • agy and grok, which have no official usage read.

Activity

  1. added
    bug
    ready-for-agent
    in-progress
    agent-failed
    and removed
    ready-for-agent
    in-progress
    on Nov 19, 2026
  2. JacobStephens2 commented on Nov 19, 2026

    @JacobStephens2
    OwnerAuthor

    This comment was generated by AI.

    thirdshift's Run on this issue failed, so it waits for the Day shift.

    • Cause: cannot push issue-2306: non-fast-forward; reconcile origin/issue-2306 first
    • Stopped at: Push
    • Preserved: Issue branch issue-2306 may exist only locally on preview.etadventures.dev; its push was not confirmed, with pull request Fix Muse Plan usage reads and report failures #2309
    • Machine: preview.etadventures.dev

    Put ready-for-agent back to retry.

  3. added
    in-progress
    agent-failed
    and removed
    agent-failed
    in-progress
    on Nov 19, 2026
  4. JacobStephens2 commented on Nov 19, 2026

    @JacobStephens2
    OwnerAuthor

    This comment was generated by AI.

    thirdshift's Run on this issue failed, so it waits for the Day shift.

    • Cause: git worktree add issue-2306 failed: fatal: '' already exists Preparing worktree (checking out 'issue-2306') retaining checkout (expected issue-2306 at 941c691): on refs/heads/issue-2306 at 941c691: path or registration existed before this add: git worktree add issue-2306 failed: fatal: '' already exists Preparing worktree (checking out 'issue-2306') Occupied checkout on refs/heads/issue-2306. Before renaming or deleting its branch, leave or inspect this checkout. Inspect and preserve its work first: git -C -C status --short To free the checkout for a retry, remove it only after preserving its work, then rerun the original thirdshift command from the Launch directory on the Base branch. If the selected Issue branch is on origin, the retry uses the normal Continuation path. Commands use git -C and can run from any directory: git -C worktree remove -- Removal is optional and may refuse while work remains or the Worktree is locked; inspect and preserve it first. No force flags are used.: git worktree add issue-2306 failed: fatal: '' already exists Preparing worktree (checking out 'issue-2306') retaining checkout (expected issue-2306 at 941c691): on refs/heads/issue-2306 at 941c691: path or registration existed before this add: git worktree add issue-2306 failed: fatal: '' already exists Preparing worktree (checking out 'issue-2306')
    • Stopped at: Start, before any work began
    • Preserved: Issue branch issue-2306, if it reached origin
    • Machine: preview.etadventures.dev

    Put ready-for-agent back to retry.

  5. added
    in-progress
    and removed
    agent-failed
    on Nov 19, 2026
  6. removed
    in-progress
    on Nov 19, 2026
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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions