Skip to content
This repository was archived by the owner on May 9, 2026. It is now read-only.

feat: agent 0.12.10 (honest /sync + bulk model switch in /keys)#94

Merged
protosphinx merged 1 commit into
mainfrom
fix/sync-honest-and-bulk-model-apply
Apr 22, 2026
Merged

feat: agent 0.12.10 (honest /sync + bulk model switch in /keys)#94
protosphinx merged 1 commit into
mainfrom
fix/sync-honest-and-bulk-model-apply

Conversation

@protosphinx
Copy link
Copy Markdown
Contributor

Summary

Two bugs surfaced after a user /sync'd 6 agents from krawler.com and saw every agent still "sleeping · last heartbeat 3h ago" on the dashboard.

Bug 1 — /sync was lying. cli-sync.ts printed kicked a cycle unconditionally, but the underlying armProfile() silently returned idle, reason: 'missing X creds' whenever the profile's active provider had no matching key in shared-keys.json. Synced profiles inherit provider=anthropic, model=claude-opus-4-7 from personal config but ship with no Anthropic key populated, so on fresh installs the cycle never actually fires. Fix: await armProfile() and surface the actual outcome per agent. Same treatment for newly-created profiles so a sync step prints created locally (cannot heartbeat yet: missing anthropic creds. Run /keys to add the missing key.) instead of pretending success.

Bug 2 — Per-profile-at-a-time model switch. If you spawn 10 agents on krawler.com, /sync creates 10 local profiles each inheriting Opus 4.7. Moving them all off Opus required /switch + /keys + save, ten times. New "Apply provider + model to all N local profiles" checkbox on the /keys page fans the save across every profile in one round-trip. Keys are always shared (one shared-keys.json per machine); the checkbox only governs per-profile provider/model.

Test plan

  • pnpm typecheck clean
  • pnpm build clean
  • Smoke: without applyAll, /save writes only the active profile's config.json
  • Smoke: with applyAll, /save writes every local profile + active profile (dedup via Set)
  • Smoke: armProfile() on a profile missing anthropic creds returns state: idle, reason: 'missing anthropic creds' — this is what /sync will now surface
  • Manual: krawler/sync shows honest per-agent outcomes for missing-key profiles
  • Manual: /keys, tick applyAll, save, verify every ~/.config/krawler-agent/profiles/*/config.json flips model

Internal note

The wizard's client-side form serializer now special-cases type='checkbox'. Previously el.value returned '1' regardless of checked state, which would have sent every checkbox as checked.

Two bugs the user hit after /sync'ing 6 agents down from krawler.com:

1. /sync was lying. "kicked a cycle" printed unconditionally, but the
   underlying armProfile() silently returned `idle, reason: "missing X
   creds"` if the profile's provider had no matching key in
   shared-keys.json — which is the common case for freshly-synced
   agents that inherit provider=anthropic but have no Anthropic key
   pasted yet. Now /sync awaits armProfile and surfaces the real
   outcome: "already local — cannot heartbeat (missing anthropic
   creds). Run /keys to add the missing key." Same treatment for
   newly-created profiles (line 108): if arm fails, the emitted row
   is "created locally (cannot heartbeat yet: ...)" instead of
   pretending success.

2. Model switch was per-profile-at-a-time. Spawn 10 agents on krawler,
   /sync creates 10 profiles each inheriting Opus 4.7, realise Opus
   hurts your wallet, you had to /switch + /keys + save ten times to
   move everyone off. New "Apply provider + model to all N local
   profiles" checkbox in the /keys page fans the save across every
   profile in one round-trip. Keys are still shared (one
   shared-keys.json per machine); only the per-profile provider/model
   gets fanned out.

Internal: the wizard's client-side form serializer now special-cases
checkbox.type — previously el.value returned '1' regardless of checked
state, which would have sent every checkbox as checked.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@protosphinx protosphinx merged commit f467f5f into main Apr 22, 2026
2 checks passed
@protosphinx protosphinx deleted the fix/sync-honest-and-bulk-model-apply branch April 22, 2026 02:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant