harness without command spawns into controller mode instead of local development mode #3

Open
opened 2026-09-17 10:07:27 +00:00 by rs · 1 comment
Owner

Calling 'harness' by itself now opens into the controller mode (like 'harness controller'). It should instead open into the local development mode in the current workdir as previously.

Calling 'harness' by itself now opens into the controller mode (like 'harness controller'). It should instead open into the local development mode in the current workdir as previously.
Author
Owner

Fixed on main in fe84b36, released as v0.10.1.

Root cause: commit cc2b1a5 made the default harness path resolve the controller URL from HARNESS_CONTROLLER_URL and controller_url, so a configured or exported controller silently selected the fleet view. HARNESS_CONTROLLER_URL is also read by agentd for inter-agent messaging, so exporting it changed the default command.

Fix:

  • The default harness command enters controller mode only with an explicit --controller <url> (a URL is required); otherwise it always runs a local agent in the workdir, regardless of controller_url/HARNESS_CONTROLLER_URL.
  • Added a harness controller subcommand resolving --controller > HARNESS_CONTROLLER_URL > controller_url, preserving config-driven fleet entry.
  • spawn/fetch/rm are unchanged.
  • Updated README.md, docs/e2e.md, docs/multi-agent.md; added TestFleetTargetOnlyExplicitFlag and TestRunControllerRequiresURL.

Leaving open for verification.

Fixed on `main` in `fe84b36`, released as `v0.10.1`. **Root cause:** commit `cc2b1a5` made the default `harness` path resolve the controller URL from `HARNESS_CONTROLLER_URL` and `controller_url`, so a configured or exported controller silently selected the fleet view. `HARNESS_CONTROLLER_URL` is also read by `agentd` for inter-agent messaging, so exporting it changed the default command. **Fix:** - The default `harness` command enters controller mode only with an explicit `--controller <url>` (a URL is required); otherwise it always runs a local agent in the workdir, regardless of `controller_url`/`HARNESS_CONTROLLER_URL`. - Added a `harness controller` subcommand resolving `--controller` > `HARNESS_CONTROLLER_URL` > `controller_url`, preserving config-driven fleet entry. - `spawn`/`fetch`/`rm` are unchanged. - Updated `README.md`, `docs/e2e.md`, `docs/multi-agent.md`; added `TestFleetTargetOnlyExplicitFlag` and `TestRunControllerRequiresURL`. Leaving open for verification.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rs/harness#3
No description provided.