Skip to content

nix: the fork's flake builds opencode without mcpx unless the consumer injects one #82

Closed

Description

@dezren39

What I found

The fork does not bundle mcpx. Its flake builds opencode with an optional mcpx argument and links the binary only when one is passed:

  • flake.nix, overlay and packages: mcpx = final.mcpx or null and mcpx = pkgs.mcpx or null
  • nix/opencode.nix: mcpx ? null, then lib.optional (mcpx != null) mcpx on the PATH and ln -s ${mcpx}/bin/mcpx $out/bin/mcpx

So nix build github:developing-today/opencode gives an opencode with no mcpx next to it, because nothing in this flake provides pkgs.mcpx. The only consumer I know is dezren39/nix, which builds mcpx from its own vendored copy and passes it in with .override { inherit mcpx; }. That repo is about to drop the copy and take mcpx from developing-today/code instead.

The core code depends on the CLI. packages/core/src/tool/plugin/mcpx.ts and its tests (mcpx-daemon-autostart.test.ts, tool-mcpx*.test.ts) start and call the daemon, with OPENCODE_MCPX_BIN and related variables to point at it. I did not check what a user sees when the binary is missing.

Questions

  1. What happens in opencode when mcpx is not on the PATH and OPENCODE_MCPX_BIN is unset? Is the failure clear?
  2. Should this flake keep mcpx optional, default to the build in developing-today/code, or fail the build when it is absent?
  3. If a default is added, which rev of code does it pin, and who updates that pin?

The maintainer decides this. Whatever is chosen should be written next to the mcpx ? null argument and in the README.

Acceptance criteria

  • Behavior without mcpx is checked and recorded here.
  • The flake either provides mcpx, or says in a comment and in the README that the consumer must.
  • A check builds packages.<system>.opencode and asserts whether bin/mcpx exists, matching the decision.

Related: developing-today/code#308 (how downstream flakes consume mcpx).

Activity

  1. dezren39 commented on Oct 26, 2026

    @dezren39
    Author

    Intake review

    🤖 Agent note · filed

    • Agent: fleet monitor
    • Session / ID: repo-fleet-monitor run 2026-10-26 17:27 CDT
    • Found via: monitor reconciliation
    • Task: Intake enrichment (§5) for this issue
    • Expectation: s — done = labels normalized, acceptance criteria confirmed present, still-live check recorded

    Still live: the fork's flake still builds opencode with mcpx ? null; nothing in this repo provides pkgs.mcpx. One development since filing sharpens question 2: dezren39/nix PR #469 dropped its vendored copy and now builds mcpx from a pinned developing-today/code input — the consumer side chose "pin code" — but that does not give a bare nix build github:developing-today/opencode an mcpx, and the missing-binary behavior (question 1) is still unrecorded.

    Related: developing-today/code#308 (downstream consumption decision), developing-today/code#309 (mcpx backlog re-home), dezren39/darwin-nix#468/#469 (consumer migration).

    Notes / risks: acceptance criteria are complete — no body edit needed. This is a maintainer-decision item (the body says so); the cheapest first step is factual: record what a user sees when mcpx is absent.

    Suggested approach: answer question 1 empirically first (run the built opencode with no mcpx on PATH, record the failure mode), then the flake decision — optional-with-docs vs default-from-code — has evidence behind it.

  2. added
    kind/questionA decision or question to resolve
    source/humanFiled directly by a human
    priority/normalOrdinary priority (the default)
    effort/sSmall: expected under 2 hours of work
    area/nixNix expressions, flakes, and packaging
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 26, 2026
  3. dezren39 commented on Oct 28, 2026

    @dezren39
    Author

    agent-note:v1 — task 2059 triage verdict: CONFIRMED, still live on current main (agent repo-queue-worker-shift-opencode, lane A)

    Re-checked at HEAD cd21eab (current main, 2026-10-28):

    • flake.nix inputs are only nixpkgs. The overlay passes mcpx = final.mcpx or null (flake.nix:46) and the packages output passes mcpx = pkgs.mcpx or null (flake.nix:65); nixpkgs has no mcpx package, so both are always null for a standalone build.
    • nix/opencode.nix:16 defaults mcpx ? null; the mcpx PATH entry (line 94) and the ln -s ${mcpx}/bin/mcpx $out/bin/mcpx link (lines 102-103) exist only when mcpx is non-null.
    • So nix build github:developing-today/opencode still produces an opencode with no mcpx beside it, while core depends on the CLI (packages/core/src/tool/plugin/mcpx.ts). The only working path remains a consumer injecting mcpx, as dezren39/nix does with .override { inherit mcpx; }.

    Follow-up enqueued: task 2688 (repo-health-opencode-pilot, small_fix) — provide mcpx by default from developing-today/code (whose flake exposes lib.make-mcpx-overlay; choosing the consumption mechanism is the fix's first decision), keep the consumer override working, update flake.lock, and verify the default build output contains bin/mcpx. Packet: packet-82-fix.json in the fleet goal's hidden files.

  4. added
    queue/queuedHas a queued task in the Supabase agent queue
    queue/claimedA queue worker has claimed the task for this item
    work/assignedAn agent holds this item via the queue (claimed task)
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Oct 28, 2026
  5. 9 remaining items

  6. dezren39 commented on Oct 28, 2026

    @dezren39
    Author

    🤖 Agent note · picked up

  7. dezren39 commented on Oct 28, 2026

    @dezren39
    Author

    🤖 Agent note · parked

  8. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedA queue worker has claimed the task for this item
    on Oct 28, 2026
  9. removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    work/assignedAn agent holds this item via the queue (claimed task)
    on Oct 28, 2026
  10. dezren39 commented on Oct 29, 2026

    @dezren39
    Author

    Merged: PR #770 (merge commit 76b8caf) — CI all green on resume check (nix-eval, build linux/windows, unit, typecheck, e2e pass). Default flake build now provides mcpx from developing-today/code; laptop verification from original fix stands (bin/mcpx present, mcpx --help runs).

    agent-note:v1 agent=repo-queue-worker-shift-opencode-b task=2688 outcome=fixed_merged pr=770

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

    area/nixNix expressions, flakes, and packagingeffort/sSmall: expected under 2 hours of workkind/questionA decision or question to resolvemeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)source/humanFiled directly by a humanstatus:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions