Skip to content

AgentHarness: phaseToCondition should fall back to status.conditions when phase=UNSPECIFIED #1958

Closed

Description

@nloke

Summary

phaseToCondition in translate.go switches on sb.GetPhase() to derive the AgentHarness Ready condition. When the OpenShell gateway returns phase=UNSPECIFIED (or omits the field entirely — see NVIDIA/OpenShell#1710), the controller permanently sets Ready=Unknown / reason=SandboxPhaseUnknown and requeues every 10 s, even though status.conditions[Ready=True] is present in the same response.

Affected code

go/core/pkg/sandboxbackend/openshell/translate.go

case openshellv1.SandboxPhase_SANDBOX_PHASE_UNKNOWN, openshellv1.SandboxPhase_SANDBOX_PHASE_UNSPECIFIED:
    return metav1.ConditionUnknown, "SandboxPhaseUnknown", msg

Observed behaviour

  • Gateway returns full status.conditions[{type:Ready, status:True}] but no phase field
  • Controller logs: reason=SandboxPhaseUnknown on every reconcile loop (every 10 s via agentHarnessNotReadyRequeue)
  • AgentHarness never reaches Ready=True despite sandbox pod running and supervisor connected

Expected behaviour

When phase is UNSPECIFIED (or missing from the wire response), the controller should inspect status.conditions as a fallback rather than immediately giving up.

Proposed fix

case openshellv1.SandboxPhase_SANDBOX_PHASE_UNKNOWN, openshellv1.SandboxPhase_SANDBOX_PHASE_UNSPECIFIED:
    // Gateway may omit the phase field (see NVIDIA/OpenShell#1710).
    // Fall back to status.conditions so an older gateway binary does not
    // permanently block AgentHarness readiness.
    for _, c := range sb.GetStatus().GetConditions() {
        if c.GetType() == "Ready" && c.GetStatus() == "True" {
            return metav1.ConditionTrue, "SandboxReady", msg
        }
    }
    return metav1.ConditionUnknown, "SandboxPhaseUnknown", msg

Evidence

# grpcurl GetSandbox — phase field absent, conditions show Ready=True
fields returned: ['metadata', 'spec', 'status']
phase present: False
status.conditions[0]: {type: Ready, status: True, reason: DependenciesReady, message: Pod is Ready; Service Exists}

Controller log before fix:

{"msg":"requeue","reason":"SandboxPhaseUnknown","agentHarness":"kagent/orch-the-orc"}

Environment

Activity

  1. christensenjairus commented on Jun 8, 2026

    @christensenjairus

    I believe the last 'compatible' version of openshell here is 0.0.51. I ran into this yesterday and downgrading fixed the status issue.

  2. EItanya commented on Jun 15, 2026

    @EItanya
    Contributor

    So as a project we have actually decided to use substrate as the core sandboxing technology. This full switchover should be done soon, and the openshell code will be removed. Once that goes in we should retest this issue, but it should be fixed. The initial support is in, but we will be adding deeper integration for simpler chat us hopefully this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions