fix: Add safety check for workspace agent verification failures#121
Merged
khaliqgant merged 2 commits intomainfrom Jan 9, 2026
Merged
fix: Add safety check for workspace agent verification failures#121khaliqgant merged 2 commits intomainfrom
khaliqgant merged 2 commits intomainfrom
Conversation
Problem: When checkActiveAgents() couldn't reach a workspace (network error, timeout), it returned hasActiveAgents: false, causing gracefulUpdateImage() to proceed with restarts even when agents might actually be running. Changes: - Add `verified: boolean` field to checkActiveAgents() return type - Return verified: false on HTTP errors and catch block (network failures) - Add SKIPPED_VERIFICATION_FAILED to UpdateResult enum - Update gracefulUpdateImage() to skip update when verified=false (unless force) - Add diagnostic logging to capture raw agent status values for debugging - Update summary to include skippedVerificationFailed count This prevents unsafe restarts of workspaces where we cannot verify agent status. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The 'broadcasts to all leads' integration test was failing on macOS with Node.js 20 due to a 100ms timeout being insufficient for message delivery. Increased to 300ms to match the pattern used by the similar 'sends message to lead by alias' test in the same file. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <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 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
verifiedflag tocheckActiveAgents()to distinguish between "no agents" and "unable to verify"forceflag is set)Problem
When
checkActiveAgents()couldn't reach a workspace (network error, timeout), it returnedhasActiveAgents: false, causinggracefulUpdateImage()to proceed with restarts even when agents might actually be running.Changes
verified: booleanfieldtrue: Successfully verified agent statusfalse: HTTP error, network error, or timeoutverified=false(unlessforceflag)SKIPPED_VERIFICATION_FAILEDstatusskippedVerificationFailedcountTest plan
forceflag overrides both conditions🤖 Generated with Claude Code