Skip to content

fix(openclaw): fallback to conditions when AgentHarness phase=UNSPECIFIED#1966

Draft
nloke wants to merge 1 commit into
kagent-dev:mainfrom
nloke:fix/openclaw-phase-unspecified
Draft

fix(openclaw): fallback to conditions when AgentHarness phase=UNSPECIFIED#1966
nloke wants to merge 1 commit into
kagent-dev:mainfrom
nloke:fix/openclaw-phase-unspecified

Conversation

@nloke
Copy link
Copy Markdown

@nloke nloke commented Jun 4, 2026

Fixes #1958

Problem

When the openclaw backend returns phase=UNSPECIFIED for a sandbox, the AgentHarness controller never surfaces Ready=True — the harness is stuck indefinitely even though the sandbox is healthy.

Root Cause

translate.go maps the OpenShell phase field directly to the AgentHarness ready state. When openclaw reports phase=UNSPECIFIED (which it does in some versions), there is no fallback — the controller sees no usable phase and never marks the harness ready.

Fix

Add a fallback in translate.go: if phase=UNSPECIFIED, check status.conditions for a Ready=True condition and use that to determine readiness instead.

// Before: phase=UNSPECIFIED → never ready
// After:  phase=UNSPECIFIED → fall back to status.conditions[Ready=True]

Testing

Validated on a local kind cluster — AgentHarness reaches Ready=True with this fix applied against an openclaw backend that reports phase=UNSPECIFIED.

…FIED

When the openclaw backend returns phase=UNSPECIFIED, the controller
would never surface Ready=True to the AgentHarness. Fall back to
checking status.conditions[Ready=True] in that case.

See: kagent-dev#1958
@github-actions github-actions Bot added the bug Something isn't working label Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant