Repository navigation
Description
Parent
Ticket KH1 of spec #2425 (0.1.2). Size: M.
What to build
A driver for OpenHands Cloud at adapters/openhands/, copied from adapters/template/ and built on driver v1 (kernel/driver.v1.md): version, schema, start, wake and stop.
Through the key helper only (N4). Every OpenHands Cloud API call goes through kernel/driver-kit/hostkey.py, with host openhands from kernel/driver-kit/hosts.json. The driver never names, reads or passes the key, and never builds a URL. It sends only a method and a path.
- Start creates an app conversation:
POST /api/v1/app-conversations, with the ticket's prompt and the harness the request names (Claude Code or Codex). Check whetheragent_profile_idpicks the harness for each conversation; if no field does, stop and ask. - Wake sends a message to the same conversation:
POST /api/v1/app-conversations/<id>/send-message, resuming its paused sandbox first. - Stop pauses the sandbox and deletes the conversation:
POST /api/v1/sandboxes/<id>/pause, thenDELETE /api/v1/app-conversations/<id>.
The run id is the conversation id.
Registry row. Add the openhands entry to kernel/driver-kit/hosts.json: the origin from the host's own OpenAPI document (its servers entry, an https:// origin with no path), variable OPENHANDS_API_KEY, keychain entry openwiz-openhands, header authorization-bearer. If the host's auth header is not a bearer token, stop and ask on this ticket: the registry has no other header form.
Open questions stop you. The API shapes above come from the drivers census (private), which your lead passes. They come from the host's published OpenAPI document; nothing has run live. If start, wake (the same run) or stop doesn't work as documented, stop and ask on this ticket: a host without wake or stop gets no driver.
Effort (J318, spec #2471). The driver either takes the user's effort or declares that it takes none. Never a silent default. Choose from the host's API, and record the choice and its source in the PR's Rulings:
- Takes effort:
effortis inversion'scanlist, andstartpasses the value to the host. A fixture test shows the value reaching the fake host. - Declares none:
effortis not incan, and the README has anEffort:line saying the host can't set it. Astartthat carrieseffortis refused with a D3 error whosenextis exactlythis host can't set effort: remove the effort for this harness in your Models table or Roster to run it at the host's default.
The field's shape is EF1's (#2558): the optional effort start input and the can entry, in kernel/driver.v1.md and kernel/driver-kit/schema.json. This driver's schema.json copy is EF1's new schema byte for byte.
Fixtures. A fake OpenHands Cloud under fixtures/, reached through the helper's loopback test override, so the kit runs in CI.
README. It opens with Login: held by OpenHands Cloud. Under that line it says where the key lives:
- the user's
OPENHANDS_API_KEY, or the keychain entryopenwiz-openhands; - OpenWiz never stores it, and the user removes it to revoke;
- the harness login (Claude Code or Codex) is a secret held by OpenHands Cloud, named in the run, never passed by OpenWiz.
Shared lines, one row each:
- the test line in
.github/workflows/ci.yml; - the entry in
tools/open-import/paths.json; - the name in
DRIVERSintools/release/build_products.py; - the
openhandsentry inkernel/driver-kit/hosts.json.
Owned paths
adapters/openhands/(new)kernel/driver-kit/hosts.json(shared with 0.1.2 spec: drivers for hosts that need an API key #2378's tickets and 0.1.2 spec: key-host wave 1, OpenHands Cloud and Warp Oz drivers #2425's other driver: only theopenhandsentry).github/workflows/ci.yml(shared: this driver's one test line)tools/open-import/paths.json(shared: this driver's one entry)tools/release/build_products.py(shared: this driver's name in DRIVERS)
Relies on: kernel/driver.v1.md, kernel/driver-kit/schema.json, kernel/driver-kit/hostkey.py, kernel/driver-kit/hosts.json
Links
- 0.1.2 KY1: the key helper, its address registry and the kit's key check (driver v1 N4) #2379 real: the key helper, its host registry and the kit's key check, which this driver calls and must pass
- 0.1.2 EF1: driver v1's optional
effortstart field, itscanentry and the can't-set-effort statement (the contract) #2558 real: the optionaleffortstart field, itscanentry and the refusal text this driver takes or declares - 0.1.2 EF15: the kit's key-host effort proof counts only the run-creation request #2819 real: the kit must prove effort reached the host at run creation
Acceptance criteria
- The kit fails against the copied template first (red log in
evidence/), then passes all five checks on fixtures in CI, its key check included - No file of the driver names the key's variable or calls the keychain, and no input, argument, output or copied environment carries the key
- The driver takes the user's effort (in
can, with a fixture test showing it reach the fake host) or declares none (noeffortincan, anEffort:README line, and the exact D3 refusal for a start that carries it) - The README's login line and key lines say where the key lives, in the spec's form
- Merge gate: merges only after its live-check ticket records 5 of 5 on the real host at this pull request's approved head (driver contract section 3)
Proof
P1 (OpenHands Cloud): test_driver.py and the kit on fixtures, red first; P3: the kit's key check and the code review. The live 5-of-5 is its live-check ticket.
Activity
jparker2006 commentedon Nov 22, 2026
launch-fleet: started (builder Opus 5.5 Medium, started by the spec #2425 lead, stacked on #2395 (KY1) under the planner's stacking decision; draft PR, merges only after #2379 merges, the 0.1.1 cut and its live check)
jparker2006 commentedon Nov 22, 2026
agent: builder
state: working
harness: Claude Code
model: Opus 5.5
skills: build-ticket@0.2.2
step: Merged the key helper's new head into draft PR 2567; tests pass behind agent CLI stubs; CI on the new head is running.
time: 2026-11-22T23:36:15Z
jparker2006 commentedon Nov 22, 2026
Builder question before the hand-back (I keep building on my pick meanwhile; the draft PR waits on the answer).
I read OpenHands Cloud's public OpenAPI document (
https://app.all-hands.dev/openapi.json, OpenAPI 3.1.0,info.version1.96.0) and its Cloud API guide (https://docs.openhands.dev/openhands/usage/cloud/cloud-api.md). Two of this ticket's stop conditions trip on the OpenAPI document:APIKeyHeader:type: apiKey, in: header, name: X-Access-Token, and every operation I use names it. It declares no bearer scheme. The Cloud API guide, though, sendsAuthorization: Bearer YOUR_API_KEYon these same endpoints (POST /api/v1/app-conversations,GET /api/v1/app-conversations/start-tasks,GET /api/v1/app-conversations).serversentry at all, so the origin can't come from it. The guide and the document's own address both usehttps://app.all-hands.dev.Options:
openhandsashttps://app.all-hands.dev, headerauthorization-bearer, as the guide documents. The live check (0.1.2 KH1L: live check: the OpenHands Cloud driver passes 5 of 5 #2456) then confirms the bearer header works before the merge. If it fails live, the driver doesn't merge.authorization-bearer, so supportingX-Access-Tokenwould mean changing the key helper (0.1.2 spec: drivers for hosts that need an API key #2378's tickets own that).My pick: (a). The host's own Cloud API guide shows bearer on exactly these endpoints, and nothing goes live before #2456 runs on the real host anyway.
The open question on
agent_profile_idhas an answer: yes, it picks the harness per conversation. It takes the id of a saved agent profile. An ACP profile'sacp_serveris one ofclaude-code,codexand others, and itsacp_modelsets the model. The driver lists the user's profiles (GET /api/agent-profiles, thenGET /api/agent-profiles/{name}), picks the ACP profile whoseacp_servermatches the requested harness and whoseacp_modelmatches the requested model, and refuses with anexttelling the user to create that profile when none matches. The harness login stays an OpenHands secret, which the profile names in itssecret_refs. The driver never passes it.jparker2006 commentedon Nov 22, 2026
Lead's answer to the auth question (comment 7087233203): register
authorization-bearerand the originhttps://app.all-hands.dev, as OpenHands' Cloud API guide documents. The OpenAPI document'sX-Access-Tokenscheme is the other route, and the registry has no form for it. Record both sources and this choice in the PR's Rulings. The live check (#2456) confirms it against the real host. If Bearer is refused there, the fix is a new header form in the key helper's contract (#2379), which goes to the planner, not into this driver. Theagent_profile_idanswer (a saved ACP profile,claude-codeorcodex) settles the harness question. Note in the README that the user saves those profiles in OpenHands.jparker2006 commentedon Nov 22, 2026
Builder question: a supporting edit, or a change in KY1 (#2395), before CI can pass here.
kernel/driver-kit/test_kit.pyon KY1's branch (at17cb430, the commit this ticket stacks on) hastest_the_registry_holds_devin_and_the_schema_and_helper_refuse_the_same_registries. Its first assertion isself.assertEqual(hostkey.registry(), good), wheregoodis thedevinentry alone. Adding this ticket'sopenhandsentry tokernel/driver-kit/hosts.json, as the ticket requires, fails that assertion. Every other registry case in the test writes its own temporary file and still passes. The same will happen to #2425's other driver and to every #2378 ticket that adds a host.Options:
devinentry is present (self.assertEqual(hostkey.registry()['devin'], good['devin'])). I then merge KY1's new head into this branch, as the stacking decision says.kernel/driver-kit/test_kit.py, as a supporting edit.My pick: (a). It's KY1's test and every key-host driver needs the change, so it belongs in one place.
Until then this branch's own tests pass (
python3 -I adapters/openhands/test_driver.py: 15 of 15, the kit's five checks among them), and only that onetest_kit.pyassertion fails.effortstart field, itscanentry and the can't-set-effort statement (the contract) #25586 remaining items
#2429: red: effort reaches OpenHands Cloud by switch_acp_effort befor…
#2429: take effort: switch_acp_effort before the first turn, refused …
#2429: green: KY1 at 2292b17 merged in; the fake OpenHands Cloud serv…
#2429: drop the comments the comment check (#1817) refuses; the secur…
#2429: red: version lists effort in can, as EF1 (#2558) lets a driver…
#2429: green: EF1 at 371c9cb merged in; effort joins can, the schema …
jparker2006 commentedon Nov 23, 2026
F4 supporting edit granted (planner), for #2429:
tools/release/build_products.pyScope: beyond this ticket's
DRIVERSname, only theopenhandsrow inKEY_CHECK_FILES(itsREADME.mdandfixtures/kit-host.json), so the installed kit runs this driver's key check the way it already does Devin's. Shared with the other key-host drivers, one row each. Granted by the spec #2425 and #2575 lead.#2429: the installed kit runs openhands's key check too (KEY_CHECK_FI…
#2429: red: R1-R5, the driver trusts unvalidated OpenHands answers, w…
#2429: fail closed on every OpenHands answer the driver acts on; wake…