fix(desktop): let a provider-backed agent be restarted after shutdown - #7072
Open
renatobardi wants to merge 1 commit into
Open
fix(desktop): let a provider-backed agent be restarted after shutdown#7072renatobardi wants to merge 1 commit into
renatobardi wants to merge 1 commit into
Conversation
🔐 Codex Security Review
|
renatobardi
force-pushed
the
fix/provider-agent-restart-after-shutdown
branch
from
September 7, 2026 01:25
8eef9d9 to
a4a4daa
Compare
The profile panel's Restart affordance was gated to `backend.type === "local"`, but a provider agent's `status` is a control-plane fact (runtime.rs's two-axis model: "the provider was invoked") that stays "deployed" forever once set — there is no v1 undeploy. It never reverts after `!shutdown` takes the harness offline, so once a provider agent went offline it had no way back: the primary action stayed permanently wired to resend `!shutdown`, never `start`. respawnManagedAgentWithRules already handles provider backends correctly (skips the stop step, calls start directly), so the local-only gate was just an unnecessary restriction — isManagedAgentActive is already backend-agnostic. Drop the extra check and use it directly. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Renato Bardi <renato.bardi@outlook.com>
renatobardi
force-pushed
the
fix/provider-agent-restart-after-shutdown
branch
from
September 7, 2026 02:20
a4a4daa to
e7fd453
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The profile panel's Restart affordance was gated to
backend.type === "local", but a provider agent'sstatusis a control-plane fact (runtime.rs's two-axis model: "the provider was invoked") that stays"deployed"forever once set — there is no v1 undeploy. It never reverts after!shutdowntakes the harness offline, so once a provider-backed agent went offline it had no way back through the UI: the primary action stayed permanently wired to resend!shutdown, never reachingstartagain.respawnManagedAgentWithRulesalready handles provider backends correctly (skips the stop step, calls start directly), so the local-only gate ononAgentRestartwas just an unnecessary restriction —isManagedAgentActiveis already backend-agnostic. Drop the extra check and use it directly.Related issue
None found.
Testing
isManagedAgentActiveas backend-agnostic (deployed provider agent / running local agent / never-deployed provider agent / stopped local agent).pnpm exec tsc --noEmitclean.pnpm exec biome checkclean.agents/profile/channelsfeature test suites: 2025/2025 passing.docs/remote-agents.mdcontract) shut down via!shutdownshowed no way to restart it from the Buzz Desktop UI, even after quitting and reopening the app.Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com