Skip to content

fix(agent-profiles): restore profile settings in cloud launches - #13

Closed
simonrosenberg wants to merge 1 commit into
mainfrom
reapply-agent-profile-launch
Closed

simonrosenberg wants to merge 1 commit into
mainfrom
reapply-agent-profile-launch

Conversation

@simonrosenberg

@simonrosenberg simonrosenberg commented Jul 27, 2026 •

Copy link
Copy Markdown
Member

Replacement for OpenHands/OpenHands#15400 after the Agent Canvas repository cutover.

HUMAN:

Validate on staging only after #12 has been deployed and the legacy empty-tool audits return zero.

  • A human has tested these changes.

AGENT:

Reapplied the reviewed OpenHands/OpenHands#15228 launch behavior onto current main, preserving the intervening title-profile and managed-key changes.


Why

OpenHands/OpenHands#15339 temporarily restored default tools after legacy persisted tools: [] values were reinterpreted as intentionally bare agents. #12 supplies the required data migration. Once that migration is deployed, cloud launches must again honor resolved Agent Profile tools, context, and provenance.

Summary

  • Resolve the ambient or requested Agent Profile once and use one launch snapshot for construction and provenance.
  • Preserve the profile's tri-state tools and agent context for OpenHands and ACP launches while keeping planning launches constrained.
  • Carry effective disabled skills, profile revision tags, secrets, suffixes, and switch-tool policy into the launched agent.

Issue Number

Closes #59.

Addresses item 3 of #51. The first-caller seed and zero-profile semantics remain open.

How to Test

poetry run pytest -q \
  -p no:ddtrace -p no:ddtrace.pytest_bdd -p no:ddtrace.pytest_benchmark \
  tests/unit/app_server/test_live_status_app_conversation_service.py

Result: 166 passed.

PYTHONPATH=".:${PYTHONPATH}" poetry run --project=enterprise pytest -q \
  -p no:ddtrace -p no:ddtrace.pytest_bdd -p no:ddtrace.pytest_benchmark \
  enterprise/tests/unit/test_agent_profiles.py

Result: 46 passed with two existing deprecation warnings.

Root and enterprise pre-commit suites both passed, including Ruff, formatting, and mypy.

After #12 is deployed to staging, launch conversations with:

  1. No profile tool override (tools: null) and verify the default tools are present.
  2. An intentionally bare profile (tools: []) and verify no tools are present.
  3. An explicit tool list and verify only that list is present.
  4. Both ambient and one-off profile selection and verify recorded profile ID/revision.
  5. OpenHands, ACP, and planning agents and verify profile context is preserved without changing the planning toolset.

Video/Screenshots

Not applicable; this is backend launch behavior.

Type

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

Notes

Do not mark this PR ready or merge it until #12 is merged, released, and its three-table staging audit is clean. Production promotion should follow a staging soak and the same audit.


Enterprise server image for this PR:

ghcr.io/openhands/enterprise-server:sha-27953de

@github-actions

github-actions Bot commented Jul 27, 2026 •

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 243-246, 255-273, 315-317, 331-335, 517-522, 602-622, 1960-1965, 2009-2019, 2080-2118, 2333-2336, 2418-2427
Project Total  

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

@simonrosenberg

Copy link
Copy Markdown
Member Author

Closing this stale pre-cutover reapplication in favor of the narrower active fixes: #368 preserves resolved profile context and tools, #453 supplies the current tool-catalog/migration work, and #364 enforces secret scope. This branch duplicates their launch-builder edits and still changes the removed enterprise/tests/ layout. The single-resolution/provenance concern is still valid and remains tracked in #51 (item 3), with #59 tracking context/tools. Those issues must not be closed merely because this duplicate PR is closed. The migration prerequisite (#12 / revision 141) merged, but the newer #453 migration and SDK rollout require their own validation.

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

Labels

type: fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[AgentProfile][cloud] Preserve resolved profile context and explicit tools in conversation builder

1 participant