Skip to content

fix(cli): don't demand local daemon config when the daemon is explicitly remote#1567

Merged
Aaronontheweb merged 2 commits into
netclaw-dev:devfrom
Aaronontheweb:fix/cli-remote-endpoint-preflight
Jul 3, 2026
Merged

fix(cli): don't demand local daemon config when the daemon is explicitly remote#1567
Aaronontheweb merged 2 commits into
netclaw-dev:devfrom
Aaronontheweb:fix/cli-remote-endpoint-preflight

Conversation

@Aaronontheweb

Copy link
Copy Markdown
Collaborator

Problem

#1540 added a chat preflight that blocks with daemon not configured - please run netclaw init whenever the local netclaw.json is missing. But "no local daemon config file" does not mean "no daemon": two supported client topologies are file-less by design, and both regressed:

  • Env-endpoint clients: NETCLAW_DAEMON_ENDPOINT=… netclaw chat against a daemon configured elsewhere (this is how the containerized eval harness drives its daemon — every eval case has failed 0/5 with this message since Require explicit main model configuration for degraded startup #1540; last green run was 2026-06-24 on 0.24.1).
  • Paired clients: a client paired to a remote daemon has client.json (endpoint) but no local netclaw.json.

The daemon side was never broken — a container daemon configured purely via NETCLAW_* env vars starts healthy. The CLI preflight just conflated "no local config file" with "nothing to talk to."

Fix

The preflight stands down when either remote-endpoint source is present — the exact sources DaemonApi.ResolveEndpoint already prefers over local daemon config:

  1. NETCLAW_DAEMON_ENDPOINT environment variable
  2. paired-client client.json endpoint

#1540's protection is preserved for the case it was written for: a truly local, truly unconfigured install still gets the clean init guidance instead of a degraded startup.

Testing

  • Two new tests: env-var endpoint allows the command; paired-client endpoint allows the command.
  • All 6 CliConfigPreflightTests pass.
  • Verified end-to-end: the eval harness goes from 0/5 instant failures (daemon not configured before any prompt reached the daemon) to executing cases normally with this fix applied.

Found while running the memory-pipeline eval gate for the (separate, upcoming) memory quick-wins PR.

…tly remote

netclaw-dev#1540's chat preflight blocks with 'daemon not configured' whenever the local
netclaw.json is missing — but NETCLAW_DAEMON_ENDPOINT and paired-client
(client.json) endpoints mean the daemon's config lives on the daemon host.
This regressed paired/remote clients and broke the containerized eval harness
(every case failed 0/5 with 'daemon not configured' from the host CLI).

Preflight now stands down when either endpoint source is present — the same
sources DaemonApi.ResolveEndpoint prefers over local daemon config.

@Aaronontheweb Aaronontheweb left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Aaronontheweb
Aaronontheweb enabled auto-merge (squash) July 3, 2026 17:20
@Aaronontheweb
Aaronontheweb merged commit d0c3799 into netclaw-dev:dev Jul 3, 2026
15 checks passed
@Aaronontheweb
Aaronontheweb deleted the fix/cli-remote-endpoint-preflight branch July 3, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working tui Terminal UI (Termina) issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant