Skip to content

fix(gateway-state): accept Running phase as alive alongside Ready #3138

@jyaunches

Description

@jyaunches

Summary

src/lib/gateway-state.ts:isSandboxReady() only recognizes the Ready phase as indicating a live sandbox:

return cols.includes("Ready") && !cols.includes("NotReady");

On some Brev deployments and during certain sandbox lifecycle transitions, the sandbox reports phase Running which is functionally equivalent to Ready (the agent is live, health checks pass inside the sandbox). The CLI treats this as "not ready" which cascades into:

  • nemoclaw <name> status reporting the sandbox as down
  • Dashboard recovery logic not triggering health fallbacks
  • The onboard-ui (brevdev/nemoclaw-image) showing the agent as stopped

Proposed Fix

return (cols.includes("Ready") || cols.includes("Running")) && !cols.includes("NotReady");

Update tests in src/lib/gateway-state.test.ts (or co-located test file) to cover the Running phase.

Context

This is the CLI-side prerequisite for brevdev/nemoclaw-image#10, which replaces the onboard-ui's reinvented health checks with NemoClaw CLI calls.

Originated from #2258 (sub-item #4), which has been closed with work redirected to the nemoclaw-image repo for the Brev-specific fixes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: cliCommand line interface, flags, terminal UX, or outputarea: installInstall, setup, prerequisites, or uninstall flowarea: onboardingOnboarding FSM, provider setup, sandbox launch, or first-run flowplatform: brevAffects Brev hosted development environments

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions