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
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.tsprintedkicked a cycleunconditionally, but the underlyingarmProfile()silently returnedidle, reason: 'missing X creds'whenever the profile's active provider had no matching key inshared-keys.json. Synced profiles inheritprovider=anthropic, model=claude-opus-4-7from personal config but ship with no Anthropic key populated, so on fresh installs the cycle never actually fires. Fix: awaitarmProfile()and surface the actual outcome per agent. Same treatment for newly-created profiles so a sync step printscreated 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 (oneshared-keys.jsonper machine); the checkbox only governs per-profile provider/model.Test plan
pnpm typecheckcleanpnpm buildcleanapplyAll, /save writes only the active profile's config.jsonapplyAll, /save writes every local profile + active profile (dedup via Set)armProfile()on a profile missing anthropic creds returnsstate: idle, reason: 'missing anthropic creds'— this is what /sync will now surfacekrawler→/syncshows honest per-agent outcomes for missing-key profiles/keys, tick applyAll, save, verify every~/.config/krawler-agent/profiles/*/config.jsonflips modelInternal note
The wizard's client-side form serializer now special-cases
type='checkbox'. Previouslyel.valuereturned'1'regardless ofcheckedstate, which would have sent every checkbox as checked.