Skip to content

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

Open

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. 27 remaining items

  8. removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/queuedHas a queued task in the Supabase agent queue
    status/triagedTriaged and routed (see agent note)
    on Nov 3, 2026
  9. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  10. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · state: handed off

    • Agent: opencode-claimant
    • Task: 6513 (repo-health-code-pilot)
    • Session / ID: ses_e5e5f822132ffegLLPlcfg2x6r
    • Route: opencode-route/workhorse, agent build
    • Claiming worker: repo-worker-code
    • Status: session created, bound in the queue lane ledger/task row, checkpointed as launched, and task packet delivered.
  11. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · probe results — stale pin named (task 6513, PR #4673)

    • Agent: repo-worker-code (opencode lane, session ses_e5e5f822132ffegLLPlcfg2x6r)
    • Pin named: inputs.self.outPath (lib/default.nix:22-27), captured at the nixos-rebuild eval that built the booted generation. No second flake input exists: ${../../bin/...} in home/common/default.nix and lib.from-root "bin/..." both resolve to ${self.outPath}/bin/.... Nix copies that tree into /nix/store at eval time, freezing the checkout's tree into the generation until the next switch.
    • Eval probe on amd (discriminating):
    • Status: fix complete in PR fix(home): run sync-models and proxy shims from checkout bin (#883) #4673 (commit 892f5a1, 8 sites migrated). NOT merged: basic: OpenCode metered-provider guard is cancelled and its workflow is disabled (gh run rerun → "Unable to retry disabled workflow"), so green is unreachable without operator action. Deploy/switch stays with the operator per packet.
    • Need: operator adjudication on the disabled guard + a switch window; then Home-layer eval uses a stale bin/ tree: commandcode-proxy unit 203/EXEC, managed opencode stuck on old rev #883 criteria 1–4 can close.
  12. 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
    work/assignedQueue worker lifecycle state
    on Nov 3, 2026
  13. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · supplement — shim build verification (task 6513)

    • Agent: repo-worker-code (opencode lane, session ses_e5e5f822132ffegLLPlcfg2x6r)
    • Built all 7 migrated shims from the PR-branch eval (nixosConfigurations.amd): every wrapper execs $HOME/code/bin/<name>.mjs — zero store-baked bin/ snapshots remain in home.packages output.
    • Combined with the oneshot eval probe in the prior note, acceptance 2–3 hold at build level. Task parked: PR fix(home): run sync-models and proxy shims from checkout bin (#883) #4673 awaits operator adjudication on the disabled metered-provider guard + a switch window. No merge, no switch performed.
  14. developing-today commented on Nov 3, 2026

    @developing-today
    Contributor

    agent-note:v1
    state: reviewed (coverage loop-back)
    Coverage pass 2026-11-03, loop-back review: this issue was re-reviewed (drift / overlap / already-handled / stale / blockers / ordering) so every open issue in the four repos is reviewed and in the system. Verdict: still live; in the system as task 6513 (small_fix, parked, priority 70) in repo-health-code-pilot. Labels audited and synced. If it is already handled at current main, its triage closes it with evidence; if oversized, the triage files the split; blockers belong on this issue.
    Found via: coverage loop-back 2026-11-03

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 workkind/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-sensitivequeue/parkedQueue task is parked (waiting on CI, time, or an event)queue/queuedHas a queued task in the Supabase agent queuesource/humanFiled directly by a humanstatus/parkedDeliberately paused with a recorded resume conditiontask/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