Skip to content

fix(app-conversation): let ordinary launches start in sandboxes below the SDK floor (OHE-3838) - #1083

Merged
tofarr merged 2 commits into
mainfrom
hiep/ohe-3838-release-blocker-error-conversation-start-failed
Oct 30, 2026
Merged

tofarr merged 2 commits into
mainfrom
hiep/ohe-3838-release-blocker-error-conversation-start-failed

Conversation

@hieptl

@hieptl hieptl commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

HUMAN:

  • A human has tested these changes.

AGENT:


Why

Since #763, _start_app_conversation calls the sandbox's /server_info and fails every new conversation start whose agent-server reports openhands-sdk below 1.54.0, before the start request is built. On OHE a sandbox cannot change image in place (resume keeps the image; replacing the sandbox loses /workspace), so after upgrading to 0.92.0 no pre-existing sandbox can host a new conversation. Explicit sandbox_id (automations, API, SDK), /new from an old conversation, Plan sub-conversations and grouping into a running old sandbox all end in:

conversation start failed: This sandbox requires openhands-sdk >=1.54.0 for Agent Profiles. Upgrade its image and start a new sandbox; existing conversations remain readable.

Customers below 0.82 have every sandbox on agent-server 1.50.1. This is the release blocker in OHE-3838.

What an agent-server that old actually does with the request, checked field by field against the 1.50.1 models and tool registry:

  • Everything an ordinary launch sends is honored. AgentContext, Tool, MCPServer and the request model are unchanged since 1.49.6 and ignore unknown fields. The default tool list resolves because create_agent() sends switch_llm through include_default_tools by class name.
  • A profile persona is dropped silently (Agent.persona landed in SDK 1.51.0).
  • The ACP agent_settings transport (fix(agent-profiles): align Enterprise launches with the SDK #763 moved ACP off the agent transport) is rejected on schema version.

Nothing profile-related changed between SDK 1.53 and 1.54, so the floor itself is historical. I kept it: no OHE release shipped an agent-server between 1.51 and 1.53 (0.82 went 1.50.1 → 1.55.1), so lowering it would change nothing in practice.

Summary

  • _ensure_profile_runtime takes the resolved launch settings. Below the floor it raises only for an ACP agent or a profile persona, with the message naming the reason; every other launch proceeds and logs a warning with the sandbox URL and reported version. Browser detection from usable_tools is unchanged.
  • docs/agent-profile-upgrade.md describes the narrowed behavior instead of telling operators to replace sandboxes through a lifecycle OHE does not have.
  • Tests: the isolated gate tests cover the persona/ACP rejection and the ordinary-launch pass-through, and two start-path tests run the real check against a 1.50.1 /server_info (the shared stub in setup_method had kept the gate out of every start test).

Issue Number

Linear OHE-3838. Refs #763 (introduced the gate) and #902, #903, #965, #966 (the earlier old-sandbox fixes this restores).

How to Test

uv run pytest -q tests/unit/app_server/test_live_status_app_conversation_service.py
uv run pre-commit run --config dev_config/python/.pre-commit-config.yaml --files openhands/app_server/app_conversation/live_status_app_conversation_service.py tests/unit/app_server/test_live_status_app_conversation_service.py

329 tests pass locally and every hook (ruff, ruff format, mypy) passes.

On Beta, with a sandbox still on agent-server:1.50.1-python (the long-lived automation sandbox from the ticket):

  1. Start a conversation with sandbox_id set to that sandbox and the default profile. The start task reaches READY and the app-server logs Sandbox … reports openhands-sdk 1.50.1 (<1.54.0); launching without Agent Profile runtime support.
  2. Repeat with agent_type: plan, and from /new inside one of its conversations. Both start.
  3. Repeat with a profile that sets a persona. The start fails with This sandbox requires openhands-sdk >=1.54.0 to launch an Agent Profile persona. Upgrade its image and start a new sandbox; existing conversations remain readable.
  4. A fresh sandbox on the current image behaves exactly as before.

I have not run the Beta steps yet; they need an existing pre-0.82 sandbox.

Video/Screenshots

None (backend only).

Type

  • Bug fix
  • Feature
  • Refactor
  • Breaking change
  • Docs / chore

Notes

  • A persona or ACP launch under a grouping strategy that only finds old running sandboxes still gets the error until those sandboxes idle-pause; a start without sandbox_id under NO_GROUPING creates a fresh one. I did not change _filter_sandboxes_with_known_spec (fix(app-conversation): prefer sandboxes on the advertised image when grouping #966): with this fix old sandboxes work again for ordinary launches, which is what that fallback intended.
  • Pre-existing and separate: ACP launches into 1.54 and 1.55 sandboxes already fail with a server 422 on agent_settings schema version (schema 9 arrived in SDK 1.56.0); the current floor never covered them.
  • Profiles with an explicit tool list that includes the sub-agent tool set carry sub_agent_scope params that a 1.50.1 TaskToolSet does not accept, so that combination still fails on the first message. Rare enough to leave ungated.
  • Upgrading an existing sandbox's image in place (runtime-api /resume with an image) would remove this class of issue for future bumps; tracked in the ticket as post-release work.

Enterprise server image for this PR:

ghcr.io/openhands/enterprise-server:sha-804f0a4

… the SDK floor (OHE-3838)

Since #763 every new conversation start calls the sandbox's /server_info
and fails when its agent-server reports openhands-sdk below 1.54.0. On
OHE a sandbox cannot change image in place, so after upgrading to 0.92.0
no pre-existing sandbox could host a new conversation: explicit
sandbox_id (automations, API, SDK), /new in an old conversation, Plan
sub-conversations and grouping into a running old sandbox all ended in
the upgrade error. Customers below 0.82 have every sandbox on 1.50.1.

An agent-server that old honors everything an ordinary launch sends
(checked field by field against the 1.50.1 models and tool registry; the
default tool list still resolves because switch_llm is sent through
include_default_tools). The two things it cannot run are a profile
persona, which it drops silently, and the ACP agent_settings transport,
which it rejects on schema version.

Keep the fast failure for those two cases, with the message naming the
reason, and let every other launch proceed with a warning in the log.
Update the upgrade guide accordingly, and cover the start path with a
test that runs the real check against a 1.50.1 /server_info instead of
the shared stub.
@github-actions github-actions Bot added the type: fix A bug fix label Oct 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  openhands/app_server/app_conversation
  live_status_app_conversation_service.py
Project Total  

This report was generated by python-coverage-comment-action

@tofarr tofarr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍰

@tofarr
tofarr merged commit d258a4d into main Oct 30, 2026
22 checks passed
@tofarr
tofarr deleted the hiep/ohe-3838-release-blocker-error-conversation-start-failed branch October 30, 2026 11:09
@openhands-release-bot openhands-release-bot Bot added the released: 1.83.0 Shipped in 1.83.0 label Nov 2, 2026
@openhands-release-bot

Copy link
Copy Markdown
Contributor

🚀 Released in 1.83.0.

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

Labels

released: 1.83.0 Shipped in 1.83.0 type: fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants