Conversation
…rotocol 0.10.x
- Raise agent-client-protocol pin from >=0.8.1,<0.9.0 to >=0.10.1,<0.11.0
- Bump openhands-sdk and openhands-tools from 1.28.1 to 1.31.0
- Port acp_impl to the 0.10.x ACP API:
* Replace AuthMethod with AuthMethodAgent
* Add close_session to BaseOpenHandsACPAgent
* Accept additional_directories/message_id kwargs per new ABC signatures
* set_config_option value is now str | bool
* list_sessions/fork_session/resume_session/new_session/prompt/load_session
signatures aligned with the 0.10.x Agent interface
- Update tests for KillTerminalCommandResponse -> KillTerminalResponse
Co-authored-by: openhands <openhands@all-hands.dev>
…rmat
openhands-sdk >= 1.32 changed Agent.mcp_config from an opaque
{"mcpServers": ...} wrapper to a flat dict[str, MCPServer]. Update all CLI
code paths to the new format and coerce legacy persisted agents on load.
Bumps openhands-sdk/openhands-tools from 1.28.1 to 1.41.0 (1.41.0 has no
breaking API changes affecting the CLI's use of the SDK).
- openhands_cli/stores/agent_store.py: convert_mcp_servers helper builds
dict[str, MCPServer] from fastmcp objects, raw dicts, or the legacy
wrapped dict, delegating field filtering/transport normalization to the
SDK's coerce_mcp_config; fastmcp-style string auth ("oauth"/bearer token)
is translated to the SDK's credential union. load_from_disk coerces
pre-1.32 persisted {"mcpServers": ...} wrappers before validation.
- openhands_cli/acp_impl/utils/mcp.py: strip ACP schema metadata
(field_meta/type) and convert HTTP/SSE headers from EnvVariable arrays to
dicts so ACP-provided servers validate as SDK MCPServer in setup.py.
- openhands_cli/setup.py: merge MCP servers using flat format.
- openhands_cli/tui/panels/mcp_side_panel.py: read flat agent.mcp_config,
format MCPServer objects directly, and compare current vs incoming specs
through the shared coercion pipeline; Incoming on Restart is unchanged.
- openhands_cli/mcp/mcp_display_utils.py: drop now-unused
normalize_server_object helper.
- tests: migrate fixtures/assertions to flat format; add regression tests
for legacy-wrapper coercion, string auth, ACP header conversion, and the
Incoming on Restart comparison.
Co-authored-by: openhands <openhands@all-hands.dev>
cbagwell
force-pushed
the
chore/bump-openhands-sdk-1.41.0
branch
from
August 9, 2026 01:53
c122bdb to
4537d9e
Compare
Contributor
|
This PR is stale because it has been open for 40 days with no activity. Remove the stale label or leave a comment, otherwise it will be closed in 10 days. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HUMAN: Newer SDK/LiteLLM would be nice to have access to. Tested with Toad for ACP changes and with https://mcp.deepwiki.com/mcp for MCP changes. Broken into 2 commits if prefer to only update to SDK 1.31.0 for now.
AGENT:
End-to-end verification performed:
Dependency resolution & install:
uv lockresolved cleanly, bumpingopenhands-sdkandopenhands-toolsto 1.41.0.uv syncinstalledthe new versions with no errors. Verified the installed version reports
1.41.0.Full test suite:
uv run pytest -q→ 1428 passed, 3 failed. The 3failures are a pre-existing
asyncio.get_event_loop()test-isolation issuein
tests/test_web_command.py(confirmed to fail identically on unmodifiedmainunder the same full-suite run, and to pass in isolation) — unrelatedto the SDK version.
MCP coercion runtime check: Verified at runtime that the migration
helpers behave correctly:
{"mcpServers": ...}wrapper → flatdict[str, MCPServer]"oauth"→strategy='oauth2'"tok123"→strategy='bearer'with secret value preservedMCPServerdump round-trips cleanly viadump_mcp_configgetattr(server.auth, "strategy", None)returnsNonesafely whenauthisNoneWhy
openhands-sdk1.28.1 is outdated. Along the upgrade path to 1.41.0, the SDKintroduced two API changes that require CLI code changes:
agent-client-protocol0.10.x renamed/reshaped ACP schema types(
AuthMethod→AuthMethodAgent, newclose_session, new kwargs) that theCLI's
acp_implmust conform to.Agent.mcp_configfrom an opaque{"mcpServers": ...}wrapper to a flatdict[str, MCPServer]. Every CLIcode path reading or writing
mcp_configneeded updating, and persistedagents saved by older versions need coercion on load.
Summary
openhands-sdk/openhands-toolsfrom 1.28.1 to 1.41.0 andagent-client-protocolto>=0.10.1,<0.11.0; portacp_implto the 0.10.xACP API.
mcp_confighandling to the flatdict[str, MCPServer]format,including backward-compat coercion of legacy
{"mcpServers": ...}persistedagents on load.
wrapper coercion, string auth, ACP header conversion, and the "Incoming on
Restart" panel comparison.
Issue Number
#786
How to Test
git clone git@github.com:cbagwell/OpenHands-CLI.git cd OpenHands-CLI git checkout chore/bump-openhands-sdk-1.41.0 uv sync uv run pytest -qExpected: 1428 passed, 3 failed (the 3 test_web_command.py failures are
pre-existing event-loop isolation issues, not introduced by this PR — they
fail identically on main).
To specifically verify the MCP migration paths:
uv run pytest tests/settings/test_mcp_settings_reconciliation.py \ tests/tui/panels/test_mcp_side_panel.py \ tests/test_utils.py tests/acp/test_confirmation.py \ tests/snapshots/test_app_snapshots.py -qExpected: all pass.
Video/Screenshots
N/A — this is a dependency bump and internal API migration with no UI changes.
Snapshot tests (tests/snapshots/test_app_snapshots.py) confirm the TUI renders
identically before and after the migration.
Type
Notes
{"mcpServers": ...} wrappers to the flat format at load, so existing users
won't see a "corrupted file" error on upgrade. An uncoercible MCP config is
dropped (not fatal); genuinely corrupted non-MCP fields still surface as
corrupted. Covered by test_load_legacy_persisted_mcp_wrapper,
test_load_persisted_mcp_with_fastmcp_string_auth,
test_load_uncoercible_persisted_mcp_is_dropped, and
test_load_non_mcp_validation_error_reports_corrupted.