OpenHands / OpenHands/enterprise
[AgentProfile][cloud] Preserve resolved profile context and explicit tools in conversation builder
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4
- Forks
- 2
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 101
Description
Summary
Cloud resolves an AgentProfile into user.agent_settings, but LiveStatusAppConversationService._build_start_conversation_request_for_user then overwrites two resolved profile-owned fields:
configured_agent_settings = user.agent_settings.model_copy(
update={
"llm": llm,
"tools": tools,
"mcp_config": mcp_config if mcp_config else {},
"agent_context": AgentContext(
system_message_suffix=effective_suffix,
secrets=secrets,
),
}
)
Consequences:
OpenHandsAgentProfile.system_message_suffixis resolved intouser.agent_settings.agent_context.system_message_suffix, then discarded when the freshAgentContextis constructed. A cloud profile's personality/instructions do not reach the launched agent.OpenHandsAgentProfile.toolsis resolved with tri-state semantics, then discarded by an unconditionalget_default_tools(...). An explicit[]or selected list cannot narrow the cloud toolset.- Other context fields must be manually reconstructed outside the resolved settings.
disabled_skillscurrently survives only becauseeffective_disabled_skills(user)is threaded through the separate skill-loading path.
The local agent-server profile path does not have this problem: it uses the resolved settings as the base, applies serving-layer additions conditionally, and treats an explicit profile tool list as authoritative.
Expected behavior
The resolved AgentProfile is the base configuration. Cloud-only launch data is additive:
- append request/integration/host suffixes to the profile's existing
agent_context.system_message_suffix; - add secrets without replacing unrelated context fields;
- if
user.agent_settings.tools is None, inject the environment-appropriate default/browser set; - if tools is
[]or an explicit list, preserve it exactly; - preserve current LLM/MCP managed overlays and member/profile
disabled_skillsbehavior.
Acceptance
- A cloud profile with
system_message_suffix="PROFILE_SUFFIX"launches with that suffix plus any dynamic request/host suffix. - A cloud profile with
tools=[]remains bare; an explicit list remains exact;tools=Nonereceives the cloud default/browser set. - Tests exercise the resolved AgentProfile path rather than only a directly constructed global
agent_settingspath. - No regression to ACP launches.
Context
- Agent Profile epic: OpenHands/software-agent-sdk#3713
- Tools follow-up: OpenHands/software-agent-sdk#3978
- Cloud implementation: OpenHands/OpenHands#15060
- The client-owned dynamic suffix gap is separate: OpenHands/software-agent-sdk#4029 / PR OpenHands/OpenHands#4030.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at LiveStatusAppConversationService._build_start_conversation_request_for_user and trace the resolved AgentProfile path through user.agent_settings. Compare it with the local agent-server profile path, then inspect the existing cloud launch tests and ACP coverage. Done means profile suffix and tri-state tools behavior are preserved, managed overlays and disabled_skills still work, and ACP launches do not regress.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100