Skip to content

Home-layer eval uses a stale bin/ tree: commandcode-proxy unit 203/EXEC, managed opencode stuck on old rev #883

Closed

Description

@dezren39

Found during the 2026-10-25 NixOS switch (generation 504, built from main @45c817e0).

Symptom 1 — declarative commandcode-proxy unit crash-loops (stopped manually after 59 restarts):

commandcode-proxy.service: Unable to locate executable '/nix/store/3gy9alpqrmkvyvjz8x34fwh1knq3dycl-bin/commandcode-proxy-start.sh': No such file or directory
Main process exited, status=203/EXEC

The -bin store copy contains only 16 files — exactly the bin/ tree of the old main (e18acea era). It is missing every bin file added Oct 24–25: commandcode-proxy.mjs/.test.mjs/-start.sh, claude-code-proxy., muse-proxy-start.sh, proxy-relay.mjs, proxy-supervise.. The ExecStart in home/common/default.nix is ${../../bin}/commandcode-proxy-start.sh, and the file IS in the repo (100755, verified via git ls-tree) and in the flake source export (25 files in bin/).

Symptom 2 — OpenChamber's managed opencode is still 2.0.30+e7baa0d after the switch, even after killing it so OpenChamber respawns it (new port, same old store path), while /run/current-system (gen 504) ships 2.0.30+954ff7c.

Deterministic, not a switch-time race: building nixosConfigurations.amd.config.system.build.toplevel from a clean checkout of current main (and from ~/code) reproduces the running toplevel bit-for-bit (2lrvq0pi…), stale -bin included. So somewhere in the eval graph the home layer (home/common and friends) is sourced from a tree that predates the Oct 24–25 bin additions, even though lib.from-root resolves to inputs.self.outPath and the flake source export itself is complete.

Impact: low right now — the proxy-supervisor's transient fps-commandcode-proxy unit serves :18748 (HTTP 200 verified), and the background opencode service (which does serve the new build + the opencode-go-* instances) is unaffected. But the declarative unit cannot take over until this is fixed, and the managed server will not pick up new opencode builds.

Pointers for whoever digs in: check how home-manager.users.user is assembled for amd (nixos/hosts/amd-krdp.nix, nixos/home/default.nix) and whether any input or module list pins a second copy of this repo at an old rev; compare nix flake metadata source bin/ (25 files) against the -bin path baked into the built unit (16 files).

Acceptance criteria

  • The root cause of the stale home-layer source tree is identified and named (which input/module pins the pre-Oct-24 tree), not just worked around.
  • A clean-checkout build of nixosConfigurations.amd.config.system.build.toplevel produces a -bin store copy containing the full current bin/ tree (including commandcode-proxy-start.sh and claude-code-proxy.*).
  • After a switch, the declarative commandcode-proxy unit starts without 203/EXEC and serves on its registered port.
  • OpenChamber's managed opencode picks up the current build after a switch/respawn (version/rev matches the system profile).

Activity

  1. developing-today commented on Oct 25, 2026

    @developing-today
    Contributor
  2. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    source/humanFiled directly by a human
    priority/highImportant and time-sensitive
    effort/mMedium: expected under 1 day of work
    area/homeHome-manager / user environment configuration
    area/nixosNixOS modules and machine configuration
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 26, 2026
  3. dezren39 commented on Oct 26, 2026

    @dezren39
    MemberAuthor

    Intake review

    Fleet monitor intake pass (2026-10-25 run). Acceptance criteria appended to the body this pass (original body preserved verbatim above it).

    Still live — no resolution found this run: The body establishes this is deterministic (a clean-checkout build reproduces the stale -bin copy bit-for-bit), so it will not heal on the next switch. No merged PR since filing names the home-layer source pin as fixed.

    Related: #894 (claude-code-proxy home wiring — its home-manager unit will land in this same home layer; if the layer is sourced from a stale tree, that unit won't take effect either, so this issue may gate part of #894), and the 2026-10-25 switch record (generation 504, main @45c817e0) in the body.

    Notes / suggested approach: The body's own pointers are the right start: how home-manager.users.user is assembled for amd (nixos/hosts/amd-krdp.nix, nixos/home/default.nix), whether any input or module list pins a second copy of this repo at an old rev, and nix flake metadata source paths vs lib.from-root resolving to inputs.self.outPath. The discriminating experiment: evaluate the home layer's bin source path directly (nix eval the relevant module arg) and compare its rev/file list against the flake source export's 25 files — the stale tree has exactly 16.

    Risks: Medium investigation risk — eval-graph source pinning can hide in an unexpected input (a locked flake input of a sub-flake is the classic shape). Impact today is contained (transient supervisor unit serves the proxy), but every future home-layer change is silently suspect until this is root-caused, hence priority/high.

  4. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    Partial blast-radius fix landed as PR #2092 (open, awaiting CI as of 2026-10-28 evening CDT — checks queued on the backlogged self-hosted runners).

    What #2092 changes: home/openclaw/default.nix — removes commandcode-proxy.service, design-code-proxy.service, and agy-proxy.service from openclaw-gateway's Wants (mcpx.service kept). The proxies are owned by the proxy-supervisor now (transient fps-* units, canonical ports 18742–18749), so a gateway restart could previously re-pull the manual units — including this issue's crash-looping commandcode-proxy with its stale nix-store ExecStart. After this change a gateway restart can no longer resurrect it.

    Still to do once #2092 merges: deploy via nixos-rebuild switch on amd, restart openclaw-gateway, and verify the manual proxy units stay inactive while the supervisor-owned proxies answer on :18748/:18746.

    Not in #2092: the manual unit declarations themselves stay in home/common/default.nix as documented manual one-off fallbacks. Noted follow-up: openchamber.service has the same Wants pattern on design-code-proxy.service (plus clef/codex/antigravity-ls manual units) and deserves the same treatment in a separate change.

  5. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    Follow-up to the manual-proxy-unit Wants cleanup: PR #2094 — "fix(home): drop openchamber wants on manual proxy units" — is open as the twin of #2092 (which removed the same class of Wants from openclaw-gateway).

    openchamber.service (home/common/default.nix) declared Wants on four manual per-proxy units; #2094 removes exactly those:

    • clef-proxy.service
    • codex-proxy.service
    • antigravity-ls-proxy.service
    • design-code-proxy.service

    network-online.target and mcpx.service are preserved, the After ordering entries are untouched, and a comment in #2092's style records why the manual units must not be re-added (proxy-supervisor owns the proxies on canonical ports 18742–18749; OpenChamber reaches them by port; the manual units are stopped fallbacks — the manual design-code unit is the one that fights the supervisor's instance for its taken port). The manual unit declarations themselves are retained as fallbacks, same as in #2092.

    Status as of 2026-10-28 evening CDT: PR #2094 is open and mergeable, but CI on the self-hosted runners is backlogged — Nix flake evaluation, run, and treefmt check stayed pending through an ~18-minute watch (CodeRabbit skipping), the same queue holding #2092. Per the merge-only-on-green rule it has not been merged, and the deploy step (converge + nixos-rebuild switch --flake …#amd, openchamber restart trigger-verification, systemctl --user reset-failed agy-proxy.service) is deferred until it merges.

  6. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · triaged — CONFIRMED still actionable (mitigated, not root-caused); fix packet enqueued

  7. 85 remaining items

  8. dezren39 commented on Nov 12, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · resumed existing PR verification

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

    @dezren39
    MemberAuthor

    🤖 Agent note · parked — CI failures need baseline triage

    • Agent: repo-worker-code · lane code-h · task 6513
    • Artifact: PR fix(home): run sync-models from checkout, not a store bin copy (#883) #8982 remains OPEN, mergeable, head 6959a79187. Existing eval/source work and root-cause evidence are in comments 6833231522 and 6833369309. PR fix(home): run sync-models and proxy shims from checkout bin (#883) #4673 is CLOSED unmerged and is not the current implementation.
    • CI: fresh run 43287121245 has fleet-search parity failure plus mcpx-test unit and e2e shard failures (some e2e shards pass); scripts-test, proxy fallbacks, and mcpx docs pass. The earlier note records parity as a main-baseline issue, but the unit/e2e failures need comparison against clean main before merge.
    • Disposition: parked at targeted_tests_failed; no merge, deploy, or switch.
    • Resume: inspect failed test names and prove baseline-vs-PR cause; merge only when checks/criteria are satisfied. Operator retains deploy/switch.
  11. added a commit that references this issue on Nov 12, 2026
  12. dezren39 commented on Nov 12, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: done (code side)
    lane: any-b (task 6513)
    summary: Task 6513 complete — outcome fixed_merged. PR #8982 merged 2026-11-12T20:37:52Z, merge commit f75d6c7. What landed: the three remaining ${../../bin/sync-models.mjs} refs in home/common/default.nix (sync-models service + sync-models/update-models shims) now run "$HOME/code/bin/sync-models.mjs" (the #2107 checkout pattern), with the source pin named in the #883 comment (lib.from-root -> inputs.self.outPath flake source snapshot) and — added this shift for the CodeRabbit finding — an explicit existence guard in all three scripts. Verification across lanes: eval probe (flake source bin/ = all 35 tracked files, exact match), full amd home-config eval succeeds with the new ExecStart, nixfmt --check + nix-instantiate --parse pass, no ${../../bin} refs remain in home/common/default.nix; CI failures on the PR were the proven baseline set (issue #8900). Remaining, by the packet's own scope: the operator deploy (nixos-rebuild switch on amd) — this issue stays OPEN for that deploy step.

  13. removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    work/assignedQueue worker lifecycle state
    on Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/homeHome-manager / user environment configurationarea/nixosNixOS modules and machine configurationeffort/mMedium: expected under 1 day of workepic/opencode-platformReprioritization program epic (2026-11-12)kind/bugSomething isn't working (prefixed form of the classic bug label)meta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/highImportant and time-sensitivesource/humanFiled directly by a humanstatus:donetask/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