Skip to content

agents: accept the harness key and agent: sandbox for bare sandboxes - #2046

Merged
adilhafeez merged 8 commits into
digitalocean:mainfrom
adilhafeez:agents-sandbox-adapter
Oct 23, 2026
Merged

adilhafeez merged 8 commits into
digitalocean:mainfrom
adilhafeez:agents-sandbox-adapter

Conversation

@adilhafeez

@adilhafeez adilhafeez commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

MARSOHS-1808

What

The API now accepts agent: sandbox as an equal spelling of agent: none for a session with no agent in it, and stores new bare sandboxes as AGENT_KIND_SANDBOX instead of AGENT_KIND_NONE. The API also renames the flat manifest key from agent to harness, with agent kept as its original name. doctl now generates and documents harness: none, accepts either key and both spellings, and recognizes both agent kinds.

$ doctl harness-runtime create --template sandbox --name eval-01 --dry-run
harness: none
name: eval-01
template: coding-base
  • Generated manifests (--harness, --template sandbox, or a lone --template) write harness: instead of agent:, and the create, config create and validate help lead with harness, noting agent as its original name.
  • Bare-sandbox checks accept both spellings: --harness none and --harness sandbox are refused with the existing pointer to --template sandbox, and launch refuses a manifest with either.
  • Validation accepts both none and sandbox with no warning.
  • harness key: validation, bare-sandbox detection and the OpenAI-agents path read harness or agent. A manifest that sets both is an error (set "harness" or "agent", not both), a missing key reports "harness" as required, and adapter errors name the key the author wrote.
  • Agent kinds: doctl treats both AGENT_KIND_NONE and AGENT_KIND_SANDBOX as a bare sandbox (ready card, startup wording) and displays both as None. godo has no constant for the new value yet, so hostedAgentKindSandbox is defined locally in commands/agents_run.go.

Release order

This build must ship after the server accepts the harness key. A server from before the rename rejects harness as an unknown field, so every create that builds its manifest (--harness, --template) would fail with a 400; hand-written agent: manifests would still work.

Why it matters for released versions

Released doctl does not know AGENT_KIND_SANDBOX. Once the server writes it, released doctl shows a new bare sandbox with the managed-agent ready card (label agent, offering launch). This build fixes that, so it should ship close to the server change.

Testing

  • go test ./commands/: all tests touched here pass. TestRegistryLogin, TestRegistryLogout and TestRefreshExpiredOAuthToken fail identically on an unmodified main checkout on this machine.
  • Against a local server stack that includes the server-side change: create --template sandbox generated agent: none (before the generator switch; --dry-run now prints harness: none), the session was stored as AGENT_KIND_SANDBOX, the ready card showed Agent None with the exec, upload, download and port-forward steps, and exec ran in the guest.
  • Same stack with the harness key: validate accepted harness: none and rejected a file with both keys; create --spec with harness: none and --prompt was refused before any session existed; without --prompt it created a ready AGENT_KIND_SANDBOX session.

adilhafeez and others added 2 commits October 15, 2026 01:23
A bare sandbox was spelled agent: none, which reads as a missing value
rather than a choice. doctl now generates agent: sandbox, accepts both
spellings everywhere it checks for a bare sandbox, warns on none during
validation, and treats both AGENT_KIND_NONE and AGENT_KIND_SANDBOX as a
session with no agent.

MARSOHS-1808

Co-authored-by: Cursor <cursoragent@cursor.com>
The API now treats agent: none and agent: sandbox as equal spellings of
a bare sandbox and stores new ones as AGENT_KIND_SANDBOX. doctl goes back
to generating agent: none, drops the deprecation warning on none, and
keeps accepting both spellings and both agent kinds.

MARSOHS-1808

Co-authored-by: Cursor <cursoragent@cursor.com>
@adilhafeez adilhafeez changed the title agents: write agent: sandbox for a bare sandbox, keep none as an alias agents: accept agent: sandbox and AGENT_KIND_SANDBOX for bare sandboxes Oct 16, 2026
The API now names the flat manifest key harness, with agent as its
original name. doctl validates, routes and detects bare sandboxes from
either key, reports a manifest that sets both, and names the key the
author wrote in errors. Generated manifests keep writing agent so they
still work against an API from before the rename.

MARSOHS-1808

Co-authored-by: Cursor <cursoragent@cursor.com>
@adilhafeez adilhafeez changed the title agents: accept agent: sandbox and AGENT_KIND_SANDBOX for bare sandboxes agents: accept the harness key and agent: sandbox for bare sandboxes Oct 19, 2026
@adilhafeez
adilhafeez marked this pull request as ready for review October 19, 2026 19:44
@kerickson-dot

Copy link
Copy Markdown

The description says switching the generator and --spec help text from agent to harness is a follow-up once the server ships. Is there an issue tracking that? The docs (digitalocean/product-docs#6855) will lead with harness: once this ships, so the CLI help and the docs will disagree until the follow-up lands.

@adilhafeez

Copy link
Copy Markdown
Contributor Author

The description says switching the generator and --spec help text from agent to harness is a follow-up once the server ships. Is there an issue tracking that? The docs (https://github.com/digitalocean/product-docs/pull/6855) will lead with harness: once this ships, so the CLI help and the docs will disagree until the follow-up lands.

Thanks @kerickson-dot for looking at it - we will want to lead with harness: but still keep agent: for backward compatibility. I will update the PR.

Manifests doctl builds for --harness and --template now write harness
instead of agent, and the create, config create and validate help lead
with harness, noting agent as its original name. This build needs an
API that accepts the harness key; release it after that ships.

MARSOHS-1808

Co-authored-by: Cursor <cursoragent@cursor.com>
@adilhafeez
adilhafeez requested a review from SSharma-10 October 23, 2026 00:33
@adilhafeez
adilhafeez merged commit cb0b82e into digitalocean:main Oct 23, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

⌂ 换网址