X Tutup
Skip to content

fix: show accurate error message when startup script fails instead of misleading "agents not connected"#22843

Open
blinkagent[bot] wants to merge 2 commits intomainfrom
fix/misleading-agent-error-message
Open

fix: show accurate error message when startup script fails instead of misleading "agents not connected"#22843
blinkagent[bot] wants to merge 2 commits intomainfrom
fix/misleading-agent-error-message

Conversation

@blinkagent
Copy link
Contributor

@blinkagent blinkagent bot commented Mar 9, 2026

What

Fixes #21946

When a startup script fails (exits with non-zero code), the UI displayed a misleading "Workspace agents are not connected" error even though the agent is actually connected and functional (SSH works, web terminal works).

Changes

Updated the UnhealthyWorkspaceAlert component in Workspace.tsx to check agent lifecycle_state in addition to connection status. The component now distinguishes between:

  • Agent disconnection — "Workspace agents have disconnected"
  • Agent connection timeout — "Your workspace is starting, but the agent has not yet connected"
  • Agent shutting down — "Workspace agent is shutting down"
  • Startup script failure — "Startup script failed" (new)
  • Default/unknown — "Workspace agents are not connected"

This ensures users see actionable, accurate messaging instead of the alarming (and incorrect) disconnection error when the real problem is just a failing startup script.

Additional fixes

  • Fixed double period bug in the alert description ("the agent has not connected yet.." → now properly formatted)
  • Replaced var with let for better scoping
  • Moved subtitle text into a variable to avoid the awkward inline {" "} + . concatenation pattern

Screenshot context

Before: User sees "Workspace agents are not connected" even though agent IS connected
After: User sees "Startup script failed" with guidance to check agent logs

blink-so bot added 2 commits March 9, 2026 14:59
… misleading "agents not connected"

When a startup script fails (exits with non-zero code), the UI was
displaying a misleading "Workspace agents are not connected" error even
though the agent is actually connected and functional (SSH works, web
terminal works).

This change updates the UnhealthyWorkspaceAlert component to check
agent lifecycle_state in addition to connection status, so it can
distinguish between:
- Agent disconnection issues
- Agent connection timeouts
- Agent shutdown states
- Startup script failures (now shows "Startup script failed")

Also fixes the double period bug in the alert description.

Fixes #21946
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.

Misleading "Workspace agents are not connected" error when startup script fails

0 participants

X Tutup