make-wg-config

Make wg config settings stick project-locally and complete the CLI surface (precedence + all knobs)

Metadata

Statusopen ‖ paused
Modelpi:zai:glm-5.2
Created2026-07-25T14:25:30.300282532+00:00
Started2026-07-26T06:14:52.772536492+00:00
Completed2026-07-26T06:51:06.281830965+00:00
Tagsdesign, config, cli, daemon, ux
Tokens30152356 in / 82130 out

Description

Objective

Today, configuring dispatcher/profile/registry settings is fragile, so things do not reliably "stick for the current repo":

  • Some knobs have NO CLI setter (e.g. coordinator.registry_refresh_interval, model_registry, provider endpoints), forcing raw file edits.
  • Raw edits to the ACTIVE profile invalidate its fingerprint and DISABLE EXECUTION ("profile changed after selection" — observed this session).
  • The --max-agents launch arg is silently overridden by the profile on any wg service reload (observed 2 -> 8).
  • Profile-vs-config-vs-launch-arg precedence is unclear; wg config --local writes can be beaten by the active profile on reload.

Make wg config the single, complete, project-local source of truth: every dispatcher/profile/registry setting settable via CLI, persisting for the current repo, surviving reload/restart, with no fingerprint footgun.

What already exists (build on it)

wg config --max-agents, --set-interval, -m/--model, --set-model <role>, --set-reasoning <role>, --role-model, --local/--global, --show. These handle daemon reload already.

Work

  1. Add CLI setters for the missing knobs — at minimum registry_refresh_interval / a registry-disable flag, and model_registry entries (the [[model_registry]] schema from fix-decouple-dispatch).
  2. Add a generic wg config set <dotted.toml.key> <value> [--local|--global] and wg config get <key> so ANY knob is settable without hand-editing files.
  3. Fix precedence so a wg config --local write AUTHORITY-sticks for the project even when a profile is active (define precedence: explicit CLI/config write > profile tier/default; or have CLI writes update the active profile atomically WITH its fingerprint).
  4. Eliminate the fingerprint footgun: ensure no supported wg config/wg profile path can leave the project in "execution disabled" — either CLI edits update the selected-profile fingerprint automatically, or raw profile edits are deprecated in favor of wg profile set that handles fingerprints.
  5. Make every setter reload the daemon and print the resolved effective value + its source.

Boundaries (coordinate, do not duplicate)

  • This is the CONFIG PLUMBING that fix-decouple-dispatch (registry disable) and study-adaptive-parallelism (max_agents authority / reload-override) depend on. Wire via the synthesis-roadmap-from plan.
  • Do not redesign the model plane (pi owns discovery).

Validation

  • Every dispatcher/profile/registry knob reachable via wg config (incl. registry_refresh_interval and model_registry) — no raw file edits needed.
  • wg config --max-agents N --local (or generic set) PERSISTS across wg service reload AND restart for the current repo; the active profile no longer silently overrides it.
  • No supported CLI path can invalidate the profile fingerprint or disable execution.
  • Generic wg config set/get <dotted.key> works for arbitrary TOML paths, project-scoped, with daemon reload.
  • Precedence documented; wg config --show annotates the winning source for each key.

Depends on

Required by

Log