feat(conversation): add client message context#4110
Closed
simonrosenberg wants to merge 2 commits into
Closed
Conversation
Co-authored-by: openhands <openhands@all-hands.dev>
2 tasks
Contributor
Python API breakage checks — ✅ PASSEDResult: ✅ PASSED |
Contributor
REST API breakage checks (OpenAPI) — ✅ PASSEDResult: ✅ PASSED |
This was referenced Jul 14, 2026
Co-authored-by: openhands <openhands@all-hands.dev>
Contributor
Coverage Report •
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Member
Author
|
Closed, superseded by #4030 |
This was referenced Jul 15, 2026
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:
AGENT:
Why
Runtime and UI context is owned by the client, can change independently of the agent profile, and should retain user-role semantics. Encoding it as a trusted launch-time system-message augmentation conflates ownership and lifecycle. This replaces the generic launch augmentation proposed in #4030 with context attached to a user message.
Summary
client_contextto local and remotesend_message, initial conversation messages, and the REST event endpoint.MessageEvent.extended_content: it is included in LLM input without changing the visible message content.RemoteConversation→ agent-server round trip.REST API contract changes
Compared with base OpenAPI
56ac31719f91for public/api/**paths.Issue Number
Supersedes #4030. Canvas consumer: OpenHands/agent-canvas#1782. Documentation: OpenHands/docs#622. Related transport work: #4078.
How to Test
Focused behavior and live-server coverage:
Result:
116 passed. The live-server test starts the actual agent server, sendsclient_contextthroughRemoteConversation, and verifies it is persisted on the userMessageEvent.Result:
18 passed.Direct isolated-environment checks on all changed Python files:
Results:
14 files already formatted,All checks passed, and0 errors, 0 warnings, 0 informations.Video/Screenshots
Not applicable; this is an SDK and API change with real-server test coverage.
Type
Notes
This is additive.
client_contextis persisted with the conversation and is not a security boundary; clients must not put secrets in it. The Canvas consumer should land after an agent-server release containing this API.Agent Server images for this PR
• GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server
Variants & Base Images
eclipse-temurin:17-jdknikolaik/python-nodejs:python3.13-nodejs22-slimgolang:1.21-bookwormPull (multi-arch manifest)
# Each variant is a multi-arch manifest supporting both amd64 and arm64 docker pull ghcr.io/openhands/agent-server:2b0b4b2-pythonRun
All tags pushed for this build
About Multi-Architecture Support
2b0b4b2-python) is a multi-arch manifest supporting both amd64 and arm642b0b4b2-python-amd64) are also available if needed