Skip to content

fix(acp): inject conversation secret_registry into ACP subprocess env - #3299

Merged
simonrosenberg merged 5 commits into
mainfrom
fix-acp-secret-registry-env
May 22, 2026
Merged

simonrosenberg merged 5 commits into
mainfrom
fix-acp-secret-registry-env

Conversation

@simonrosenberg

@simonrosenberg simonrosenberg commented May 19, 2026 •

Copy link
Copy Markdown
Member

Summary

  • ACPAgent._start_acp_server now injects secrets from state.secret_registry into the spawned ACP subprocess environment. This makes the standard Conversation.update_secrets() / payload.secrets channel work for ACP clients without requiring each caller to also build an AgentContext(secrets={...}) shim.

  • ACPAgent._render_suffix now renders the <CUSTOM_SECRETS> block from state.secret_registry even when agent_context is absent, so ACP servers are told which env vars are available.

  • Same-key env precedence is now explicit:

    ACPAgent.acp_env > os.environ > default_environment > state.secret_registry > agent_context.secrets
    

    ACPAgent.acp_env includes provider-derived env when the agent is built via ACPAgentSettings.create_agent(). Registry/context secrets only fill missing base-env keys, so host env values are not silently shadowed.

Why this belongs in the SDK

Both OpenHands' app_server and agent-canvas already use the standard conversation-secrets channel; those secrets land in secret_registry on the agent-server side. The ACP spawn-time env builder is the shared runtime boundary that must consume that registry. Keeping this in the SDK means every current and future agent-server consumer gets the same behavior.

Test plan

  • .venv/bin/pytest tests/sdk/agent/test_acp_agent.py — 180 passed
  • New/updated ACP coverage includes:
    • Registry-only secrets are advertised in <CUSTOM_SECRETS> without agent_context
    • Plain str secret in registry → injected
    • SecretSource / LookupSecret-shaped source in registry → resolved + injected
    • acp_env precedence over registry
    • secret_registry precedence over agent_context.secrets
    • Empty registry is a no-op
    • A failing SecretSource lookup is skipped, not propagated
  • .venv/bin/ruff format --check openhands-sdk/openhands/sdk/agent/acp_agent.py tests/sdk/agent/test_acp_agent.py
  • .venv/bin/ruff check openhands-sdk/openhands/sdk/agent/acp_agent.py tests/sdk/agent/test_acp_agent.py
  • git diff --check

Note on commits

The cleanup commit was pushed with --no-verify because uv run rewrites uv.lock during pre-commit in this repo due to the pre-existing [tool.uv] exclude-newer = "7 days" parse issue. The changed files were verified directly with the venv binaries above.

🤖 Generated with Claude Code


Agent Server images for this PR

• GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server

Variants & Base Images

Variant Architectures Base Image Docs / Tags
java amd64, arm64 eclipse-temurin:17-jdk Link
python amd64, arm64 nikolaik/python-nodejs:python3.13-nodejs22-slim Link
golang amd64, arm64 golang:1.21-bookworm Link

Pull (multi-arch manifest)

# Each variant is a multi-arch manifest supporting both amd64 and arm64
docker pull ghcr.io/openhands/agent-server:08b3f28-python

Run

docker run -it --rm \
  -p 8000:8000 \
  --name agent-server-08b3f28-python \
  ghcr.io/openhands/agent-server:08b3f28-python

All tags pushed for this build

ghcr.io/openhands/agent-server:08b3f28-golang-amd64
ghcr.io/openhands/agent-server:08b3f28d3c000b44a28b57a2f0930926942e6074-golang-amd64
ghcr.io/openhands/agent-server:fix-acp-secret-registry-env-golang-amd64
ghcr.io/openhands/agent-server:08b3f28-golang_tag_1.21-bookworm-amd64
ghcr.io/openhands/agent-server:08b3f28-golang-arm64
ghcr.io/openhands/agent-server:08b3f28d3c000b44a28b57a2f0930926942e6074-golang-arm64
ghcr.io/openhands/agent-server:fix-acp-secret-registry-env-golang-arm64
ghcr.io/openhands/agent-server:08b3f28-golang_tag_1.21-bookworm-arm64
ghcr.io/openhands/agent-server:08b3f28-java-amd64
ghcr.io/openhands/agent-server:08b3f28d3c000b44a28b57a2f0930926942e6074-java-amd64
ghcr.io/openhands/agent-server:fix-acp-secret-registry-env-java-amd64
ghcr.io/openhands/agent-server:08b3f28-eclipse-temurin_tag_17-jdk-amd64
ghcr.io/openhands/agent-server:08b3f28-java-arm64
ghcr.io/openhands/agent-server:08b3f28d3c000b44a28b57a2f0930926942e6074-java-arm64
ghcr.io/openhands/agent-server:fix-acp-secret-registry-env-java-arm64
ghcr.io/openhands/agent-server:08b3f28-eclipse-temurin_tag_17-jdk-arm64
ghcr.io/openhands/agent-server:08b3f28-python-amd64
ghcr.io/openhands/agent-server:08b3f28d3c000b44a28b57a2f0930926942e6074-python-amd64
ghcr.io/openhands/agent-server:fix-acp-secret-registry-env-python-amd64
ghcr.io/openhands/agent-server:08b3f28-nikolaik_s_python-nodejs_tag_python3.13-nodejs22-slim-amd64
ghcr.io/openhands/agent-server:08b3f28-python-arm64
ghcr.io/openhands/agent-server:08b3f28d3c000b44a28b57a2f0930926942e6074-python-arm64
ghcr.io/openhands/agent-server:fix-acp-secret-registry-env-python-arm64
ghcr.io/openhands/agent-server:08b3f28-nikolaik_s_python-nodejs_tag_python3.13-nodejs22-slim-arm64
ghcr.io/openhands/agent-server:08b3f28-golang
ghcr.io/openhands/agent-server:08b3f28d3c000b44a28b57a2f0930926942e6074-golang
ghcr.io/openhands/agent-server:fix-acp-secret-registry-env-golang
ghcr.io/openhands/agent-server:08b3f28-golang_tag_1.21-bookworm
ghcr.io/openhands/agent-server:08b3f28-java
ghcr.io/openhands/agent-server:08b3f28d3c000b44a28b57a2f0930926942e6074-java
ghcr.io/openhands/agent-server:fix-acp-secret-registry-env-java
ghcr.io/openhands/agent-server:08b3f28-eclipse-temurin_tag_17-jdk
ghcr.io/openhands/agent-server:08b3f28-python
ghcr.io/openhands/agent-server:08b3f28d3c000b44a28b57a2f0930926942e6074-python
ghcr.io/openhands/agent-server:fix-acp-secret-registry-env-python
ghcr.io/openhands/agent-server:08b3f28-nikolaik_s_python-nodejs_tag_python3.13-nodejs22-slim

About Multi-Architecture Support

  • Each variant tag (e.g., 08b3f28-python) is a multi-arch manifest supporting both amd64 and arm64
  • Docker automatically pulls the correct architecture for your platform
  • Individual architecture tags (e.g., 08b3f28-python-amd64) are also available if needed

ACPAgent._start_acp_server already received the conversation's state
and used state.secret_registry to render the <CUSTOM_SECRETS> block in
the prompt, but it skipped the registry when building the subprocess
environment. Anything sent via Conversation.update_secrets() (or the
equivalent payload.secrets channel that app-server callers like
agent-canvas use) was therefore invisible to the ACP CLI — to make a
named secret reach the subprocess you had to also build an
AgentContext(secrets=...) shim around the same data.

Fill any keys still absent after acp_env and agent_context.secrets
straight from state.secret_registry, preserving the precedence
acp_env > provider env > agent_context.secrets > secret_registry.

Tests cover: a plain string secret round-trips, a LookupSecret
callable resolves, acp_env wins over the same key in the registry,
agent_context.secrets wins over the same key in the registry, an
empty registry is a no-op, and a SecretSource that raises on lookup
is silently dropped (matching the existing get_secret_value contract)
instead of taking the whole spawn down.

All hooks verified manually via venv binaries (ruff format/check,
pycodestyle, pyright); --no-verify used because uv run rewrites
uv.lock mid pre-commit stash on this repo (malformed
exclude-newer = "7 days" in pyproject.toml, pre-existing on main).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the release-note-required PR requires explicit release-note coverage for behavioral or default changes label May 19, 2026
@github-actions

github-actions Bot commented May 19, 2026 •

Copy link
Copy Markdown
Contributor

Python API breakage checks — ✅ PASSED

Result: ✅ PASSED

Behavioral default changes detected

These public Field(default=...) changes were auto-marked with the release-note-required label:

  • openhands.sdk.llm.llm.LLM.model: 'claude-sonnet-4-20250514' → 'gpt-5.5'

Action log

@github-actions

github-actions Bot commented May 19, 2026 •

Copy link
Copy Markdown
Contributor

REST API breakage checks (OpenAPI) — ✅ PASSED

Result: ✅ PASSED

Action log

@all-hands-bot all-hands-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🟢 Taste Rating: Good taste — minimal, direct fix; precedence is preserved and the new tests cover the important registry/lookup/precedence/failure cases.

[RISK ASSESSMENT]

  • [Overall PR] ⚠️ Risk Assessment: 🟡 MEDIUM
    This touches ACP subprocess environment construction and secret propagation, so it can affect ACP agent behavior. I found no code issues, but per repo review policy I’m leaving a COMMENT rather than approving so a human maintainer can decide whether lightweight ACP/eval validation is needed.

VERDICT: ✅ Worth merging after maintainer/eval-risk signoff.

This review was generated by an AI agent (OpenHands) on behalf of the user.

@github-actions

github-actions Bot commented May 19, 2026 •

Copy link
Copy Markdown
Contributor

Coverage

Coverage Report •
FileStmtsMissCoverMissing
openhands-sdk/openhands/sdk/agent
   acp_agent.py6294393%342–344, 474–475, 508, 510, 514, 518, 526, 589–590, 595, 662, 815, 818–819, 836–837, 866, 871, 889, 899, 920–923, 1120–1123, 1127–1129, 1132–1136, 1138, 1298, 1634–1635
openhands-sdk/openhands/sdk/settings
   model.py5695091%83, 108, 113, 352, 362–365, 368, 381, 385, 391, 401, 407, 412, 602, 615, 626, 636, 640, 642, 644, 646, 648, 650, 652, 924, 926, 1039, 1223, 1291, 1329, 1414, 1450–1453, 1479, 1603, 1648, 1680, 1690, 1692, 1697, 1715, 1728, 1730, 1732, 1734, 1741
TOTAL27093791970% 

… channel

Refines the env-build ordering in _start_acp_server to the
single-rule model:

  StartConversationRequest.secrets are conversation secrets.
  For OpenHands agents they're available through the secret
  registry; for ACP agents they're exposed to the ACP subprocess
  environment because the ACP subprocess owns execution.

Precedence (lowest → highest):
  default_environment + os.environ          baseline
  state.secret_registry                     canonical channel
  agent_context.secrets                     legacy direct-attach
  self.acp_env                              explicit override

Behaviour shift: on collision between secret_registry and
agent_context.secrets, the registry now wins (was: agent_context).
The canonical conversation channel should beat the legacy direct-
attach so OpenHands can eventually drop its AgentContext(secrets=...)
shim without a behaviour break during the migration. Same-value
collisions (today's OpenHands sends through both) produce identical
output; only differing-value collisions change, and there are no
known callers that do that.

Also updates _render_suffix to render the <CUSTOM_SECRETS> block
from state.secret_registry even when agent_context is absent — a
conversation that ships secrets only through the canonical channel
shouldn't have its agent left ignorant of env vars that are about
to be injected into its subprocess. Preserves the "no agent_context
+ empty registry ⇒ no suffix" guard so the empty AgentContext()
defaults (current_datetime, …) don't leak into the prompt.

Tests:
- Updated the agent_context-vs-registry precedence test to assert
  the new winner (registry).
- Added test_init_state_renders_registry_secrets_without_agent_context
  pinning the new _render_suffix behaviour.
- All 194 tests in test_acp_agent.py + test_agent_secrets_integration.py
  pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@all-hands-bot all-hands-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

✅ QA Report: PASS

Verified the ACP subprocess receives secrets supplied through Conversation.update_secrets() while preserving explicit acp_env precedence.

Does this PR achieve its stated goal?

Yes. I exercised the SDK as a user would: created an ACPAgent, called Conversation.update_secrets(...), sent a message, and ran the conversation against a minimal ACP-compatible subprocess that captured its environment and completed initialize, session/new, and session/prompt. On base main, QA_REGISTRY_SECRET was null in the subprocess env; on PR commit 36266de, the same flow produced QA_REGISTRY_SECRET=from-secret-registry, while QA_SHARED_SECRET remained from-acp-env, confirming registry secrets fill gaps without overriding explicit ACP env values.

Phase Result
Environment Setup ✅ make build completed successfully
CI Status 🟡 Core checks passing; several longer Agent Server/build and sdk-tests checks still in progress when checked
Functional Verification ✅ Before/after SDK conversation flow confirmed the fix
Functional Verification

Test 1: ACP subprocess env receives conversation secret registry values

Step 1 — Reproduce / establish baseline without the fix:
Checked out origin/main at 3e5ed6e9 and ran:

OPENHANDS_SUPPRESS_BANNER=1 uv run python /tmp/qa_acp_raw_flow.py

Relevant output:

{
  "event": "process_start",
  "env": {
    "QA_ACP_ENV_SECRET": "from-acp-env",
    "QA_REGISTRY_SECRET": null,
    "QA_SHARED_SECRET": "from-acp-env"
  }
}

The same run initialized the ACP subprocess and completed the user message flow:

method":"initialize"
method":"session/new"
method":"session/prompt"

This confirms the old behavior: secrets added via conversation.update_secrets({"QA_REGISTRY_SECRET": "from-secret-registry"}) were stored on the conversation but did not reach the ACP subprocess environment.

Step 2 — Apply the PR's changes:
Checked out fix-acp-secret-registry-env at 36266de413038152e2323f60f340822ab78dc4a7.

Step 3 — Re-run with the fix in place:
Ran the same command:

OPENHANDS_SUPPRESS_BANNER=1 uv run python /tmp/qa_acp_raw_flow.py

Relevant output:

{
  "event": "process_start",
  "env": {
    "QA_ACP_ENV_SECRET": "from-acp-env",
    "QA_REGISTRY_SECRET": "from-secret-registry",
    "QA_SHARED_SECRET": "from-acp-env"
  }
}

The subprocess again completed the ACP interaction:

ACP server initialized: agent_name='qa-raw-acp', agent_version='0.0.0'
Sending ACP prompt (timeout=10s, blocks=1)
ACP prompt returned in 2.0s

This confirms the fix works: the registry-only secret is now present in the spawned ACP process. It also confirms the advertised precedence behavior for explicit ACP env values: QA_SHARED_SECRET stayed from-acp-env even though the registry provided from-secret-registry for the same key.

Issues Found

None.

This review was created by an AI agent (OpenHands) on behalf of the user.

@all-hands-bot all-hands-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Found one precedence side effect that should be fixed before merge.

This review was generated by an AI agent (OpenHands) on behalf of the user.


Was this automated review useful? React with 👍 or 👎 to this review to help us measure review quality.
Workflow run: https://github.com/OpenHands/software-agent-sdk/actions/runs/26164639256

@all-hands-bot all-hands-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

✅ QA Report: PASS

Verified ACP secret-registry behavior by running SDK scripts that spawn a real ACP subprocess; registry secrets are now advertised and injected with the documented precedence.

Does this PR achieve its stated goal?

Yes. On origin/main, a registry-only secret was neither listed in the ACP suffix nor present in the spawned ACP subprocess environment. On PR commit 6e8f21bb0a37f6c3b9d04c5a332a9c7320260666, the same runtime check showed QA_REGISTRY_SECRET in the <CUSTOM_SECRETS> suffix and in the subprocess env, while acp_env, host env, registry, and agent_context.secrets precedence behaved as described.

Phase Result
Environment Setup ✅ Used uv run to create/update the project .venv and import/run SDK code; no tests, linters, or formatters were run.
CI Status 🟡 GitHub reports 32 successful, 4 skipped, 1 pending (QA Changes by OpenHands) at review time; 0 failing.
Functional Verification ✅ Real ACP subprocess env capture confirms the fix and precedence behavior.
Functional Verification

Test 1: registry-only conversation secret is advertised and injected

Step 1 — Reproduce / establish baseline without the fix:
Checked out origin/main (0aa2653ce52d2c2bccf39aec3e3eb68cec0c2fd1) and ran:

OPENHANDS_SUPPRESS_BANNER=1 uv run python /tmp/qa_acp_runtime_check.py

Relevant output:

SUFFIX_HAS_REGISTRY_SECRET False
ENV_CAPTURE_EXISTS True
ENV_CAPTURE {"QA_ACP_OVERRIDE": "from-acp-env"}
START_PROCESS_EXITCODE -15

This confirms the bug: the registry-only secret was not rendered in the ACP suffix and did not reach the real spawned ACP subprocess env. Only the explicit acp_env override was present.

Step 2 — Apply the PR's changes:
Checked out fix-acp-secret-registry-env at 6e8f21bb0a37f6c3b9d04c5a332a9c7320260666.

Step 3 — Re-run with the fix in place:
Ran the same command:

OPENHANDS_SUPPRESS_BANNER=1 uv run python /tmp/qa_acp_runtime_check.py

Relevant output:

SUFFIX_HAS_REGISTRY_SECRET True
SUFFIX_MENTIONS_CUSTOM_SECRETS True
ENV_CAPTURE_EXISTS True
ENV_CAPTURE {"QA_ACP_OVERRIDE": "from-acp-env", "QA_REGISTRY_SECRET": "from-registry"}
START_PROCESS_EXITCODE -15

This shows the fix works: the registry secret is advertised through <CUSTOM_SECRETS> and injected into the ACP subprocess environment. The -15 exit code is from the QA harness terminating the startup process after the subprocess env file was captured.

Test 2: documented same-key precedence works at the subprocess boundary

On the PR branch, ran:

OPENHANDS_SUPPRESS_BANNER=1 uv run python /tmp/qa_acp_precedence_check.py

Relevant output:

ENV_CAPTURE_EXISTS True
ENV_CAPTURE {"QA_ACP_OVERRIDE": "from-acp-env", "QA_CONTEXT_ONLY": "from-context", "QA_HOST_SECRET": "from-host-env", "QA_SHARED_CONTEXT": "from-registry"}
START_PROCESS_EXITCODE -15

This verifies the claimed precedence in a spawned ACP subprocess: acp_env wins over registry (QA_ACP_OVERRIDE), host env wins over registry (QA_HOST_SECRET), registry wins over agent_context.secrets (QA_SHARED_CONTEXT), and context-only secrets still fill missing keys (QA_CONTEXT_ONLY).

Issues Found

None.

This QA review was created by an AI agent (OpenHands) on behalf of the user.

Verdict: PASS

Move env.update(self.acp_env) ahead of the registry/agent_context
secret-resolution loops so the existing "if name in env: continue"
guards skip lookups for keys an explicit acp_env entry will override.

Previously a LookupSecret in the registry (or a SecretSource in
agent_context.secrets) with the same key as an acp_env entry triggered
an unnecessary HTTP round-trip / warning before being overwritten.

Same documented precedence:
  acp_env > os.environ > default_environment >
  secret_registry > agent_context.secrets

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@all-hands-bot all-hands-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🟢 Taste Rating: Good taste — centralizes registry secret injection at the ACP subprocess boundary and keeps precedence explicit. I don’t see new code issues; the previous acp_env/lookup concern appears addressed by the early name in env guard and coverage.

[RISK ASSESSMENT]

  • [Overall PR] ⚠️ Risk Assessment: 🟡 MEDIUM
    This changes ACP subprocess environment construction and prompt-visible secret advertisement, so it can affect agent behavior and benchmark/eval outcomes. Per repo policy, I’m leaving a COMMENT rather than approval for human maintainer/eval-risk signoff.

This review was generated by an AI agent (OpenHands) on behalf of the user.


Was this automated review useful? React with 👍 or 👎 to this review to help us measure review quality.
Workflow run: https://github.com/OpenHands/software-agent-sdk/actions/runs/26165579213

@all-hands-bot all-hands-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

✅ QA Report: PASS

Verified via a real SDK Conversation using an ACPAgent and a spawned fake ACP subprocess; conversation secrets now reach the ACP process env and are advertised in dynamic context.

Does this PR achieve its stated goal?

Yes. The PR set out to make the standard Conversation(..., secrets=...) / secret-registry channel work for ACP subprocesses without requiring an AgentContext(secrets=...) shim. Running the same ACP conversation harness on base showed registry secrets were absent from the subprocess env and <CUSTOM_SECRETS> was not rendered; running it on commit 9d0b2a95 showed both plain string and SecretSource registry secrets in the spawned subprocess env, <CUSTOM_SECRETS> advertised them, and acp_env still took precedence on collisions.

Phase Result
Environment Setup ✅ uv run python created/used the project environment and imported the SDK successfully.
CI Status 🟡 Most checks are green; qa-changes plus two Agent Server build/push jobs were still in progress when checked.
Functional Verification ✅ Actual ACP conversation startup exercised initialize, session/new, and session/prompt against a spawned subprocess.
Functional Verification

Test 1: Conversation secret registry values reach ACP subprocess env and dynamic context

Step 1 — Reproduce / establish baseline without the fix:
Checked out origin/main and ran OPENHANDS_SUPPRESS_BANNER=1 uv run python /tmp/acp_secret_registry_qa.py.

{
  "capture": {
    "QA_ACP_ONLY": "visible-acp-env",
    "QA_LOOKUP_SECRET": null,
    "QA_PRECEDENCE_SECRET": "from-acp-env",
    "QA_REGISTRY_SECRET": null
  },
  "dynamic_context_has_custom_secrets": false,
  "dynamic_context_mentions_lookup_secret": false,
  "dynamic_context_mentions_precedence_secret": false,
  "dynamic_context_mentions_registry_secret": false,
  "requests_seen": ["initialize", "session/new", "session/prompt"],
  "run_error_type": null
}

This confirms the old behavior: the actual ACP subprocess started, but secrets supplied through the conversation secrets channel did not appear in its environment, and the ACP prompt context did not advertise them.

Step 2 — Apply the PR's changes:
Checked out PR commit 9d0b2a95f8fa54e8be5bff1dac132d4c855d284b.

Step 3 — Re-run with the fix in place:
Ran OPENHANDS_SUPPRESS_BANNER=1 uv run python /tmp/acp_secret_registry_qa.py again.

{
  "capture": {
    "QA_ACP_ONLY": "visible-acp-env",
    "QA_LOOKUP_SECRET": "from-secret-source",
    "QA_PRECEDENCE_SECRET": "from-acp-env",
    "QA_REGISTRY_SECRET": "from-conversation-secret-channel"
  },
  "dynamic_context_has_custom_secrets": true,
  "dynamic_context_mentions_lookup_secret": true,
  "dynamic_context_mentions_precedence_secret": true,
  "dynamic_context_mentions_registry_secret": true,
  "requests_seen": ["initialize", "session/new", "session/prompt"],
  "run_error_type": null
}

This shows the fix working in the user-facing SDK path: a Conversation with an ACPAgent spawned a subprocess, the subprocess inherited both a plain registry secret and a SecretSource-resolved secret, <CUSTOM_SECRETS> was sent in dynamic context without any AgentContext, and acp_env preserved precedence for QA_PRECEDENCE_SECRET.

Issues Found

None.

This review was created by an AI agent (OpenHands) on behalf of the user.

The docstring on ACPAgentSettings.resolve_acp_env still documented the
pre-secret-registry precedence (acp_env > provider env >
agent_context.secrets) and omitted the canonical conversation-secret
channel entirely. Update it to reflect what ACPAgent._start_acp_server
actually does today.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@simonrosenberg

Copy link
Copy Markdown
Member Author

@OpenHands fix failing tests

@openhands-ai

openhands-ai Bot commented May 22, 2026

Copy link
Copy Markdown

I'm on it! simonrosenberg can track my progress at all-hands.dev

Copy link
Copy Markdown
Member Author

Looked into the failing CI:

The only failing test in the latest CI run was tests/sdk/conversation/local/test_conversation_pause_functionality.py::TestPauseFunctionality::test_pause_while_running_continuous_actions:

FAILED tests/sdk/conversation/local/test_conversation_pause_functionality.py::TestPauseFunctionality::test_pause_while_running_continuous_actions - AssertionError: assert <ConversationExecutionStatus.ERROR: 'error'> == <ConversationExecutionStatus.PAUSED: 'paused'>
===== 1 failed, 3724 passed, 13 xfailed, 70 warnings in 107.16s =====

This test is a known-style timing-sensitive pause test that races conversation.pause() against the agent's run loop. It has nothing to do with this PR — the diff against main only touches:

  • openhands-sdk/openhands/sdk/agent/acp_agent.py
  • openhands-sdk/openhands/sdk/settings/model.py
  • tests/sdk/agent/test_acp_agent.py

I confirmed locally:

  • Running just the failing test 5x in a row → passes 5/5.
  • Running the whole test_conversation_pause_functionality.py file under -n 4 → 6/6 pass.

So this is a CI flake on the blacksmith runner, not a regression from this PR. I've re-triggered the failed jobs on run 26166403246 (gh run rerun --failed).

This comment was created by an AI agent (OpenHands) on behalf of @simonrosenberg.

@openhands-ai

openhands-ai Bot commented May 22, 2026

Copy link
Copy Markdown

OpenHands encountered an error: Request timeout after 30 seconds to https://vpuymryhoctvkggj.prod-runtime.all-hands.dev/api/conversations/13ccddd6-e7c8-4889-b252-57c453adbc06/ask_agent

See the conversation for more information.

@simonrosenberg simonrosenberg added the acp About ACP label May 22, 2026
@simonrosenberg
simonrosenberg merged commit af0b793 into main May 22, 2026
66 of 68 checks passed
@simonrosenberg
simonrosenberg deleted the fix-acp-secret-registry-env branch May 22, 2026 19:17
StressTestor pushed a commit to StressTestor/software-agent-sdk that referenced this pull request Jun 1, 2026
…OpenHands#3299)

Co-authored-by: Debug Agent <debug@example.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
pengzhang-create pushed a commit to Pyromind-Dynamics/software-agent-sdk that referenced this pull request Aug 13, 2026
…OpenHands#3299)

Co-authored-by: Debug Agent <debug@example.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

acp About ACP release-note-required PR requires explicit release-note coverage for behavioral or default changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants