Skip to content

Re-apply agent wiring after a successful auto-update - #219

Open
pinjun99 wants to merge 1 commit into
reason-machines:mainfrom
pinjun99:fix/reapply-wiring-after-update-182-v2
Open

pinjun99 wants to merge 1 commit into
reason-machines:mainfrom
pinjun99:fix/reapply-wiring-after-update-182-v2

Conversation

@pinjun99

Copy link
Copy Markdown

Fixes #182 (option 2 from the issue).

What changed

After an auto-update replaces the binary, the agent wiring (Claude Code / Codex / opencode configs) stayed at whatever the first setup wrote until someone ran setup again by hand.

Now, after a successful standalone install, the updater refreshes the wiring for agents that are already wired, then restarts. It never wires up an agent that wasn't set up before. doctor still reports out-of-date wiring, so a hand refresh stays possible.

  • src/daemon/update.rs: re-apply wiring for already-wired agents after a successful install, before restart
  • src/setup.rs: small helper so the updater can refresh existing wiring only
  • DESIGN.md: note the new update behaviour

Testing

On this branch (rebased on main 5442c8b), rustc 1.99.1:

  • cargo fmt --check: clean
  • cargo clippy --all-targets -- -D warnings: clean
  • cargo test: 343 + 5 + 2 passed, 0 failed

I haven't run a real end-to-end auto-update against a released binary.

Written with help from an AI coding assistant; I reviewed the change and ran the checks above.

An update replaced the binary but left Claude Code / Codex / opencode
configs from the first setup until someone ran setup again. After a
successful standalone install, refresh only agents that are already
wired (never wire up new ones), then restart. doctor still reports
out-of-date wiring for hand refresh.

Fixes reason-machines#182
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

An update doesn't re-apply the agent wiring: Claude Code and opencode keep what the first setup wrote, and doctor says wired

1 participant