Error when trying to run sandbox example?

Open Beginner friendly
#4,672 1 comment 1 reaction 1 assignee View on GitHub

Maintainers usually reply within 1 day

@dgageot is already working on this.

Since Oct 21, 2026.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
62/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
docker, go
Domain
backend

Research direction

Start with examples/sandbox_agent.yaml and trace how docker-agent reads the sandbox list and expects the sbx ls --json output to be shaped. Reproduce with the versions and command in the report, then compare the returned array with the expected { sandboxes: [] } object. Done when the reported error is resolved for the documented command.

Written by the indexing model from the issue text.

Description

area/cli

Good day,

Apologies in advance, this is most likely a user-error, but I'm not sure where else to get assistance with this. When trying to run the sandbox_agent.yaml from the examples folder, I'm getting the error: Error: decoding sandbox list: json: cannot unmarshal array into Go value of type struct { Sandboxes []sandbox.Existing "json:\"sandboxes\"" }.

It looks like docker-agent is expecting the json in format { sandboxes: [] } but running sbx ls --json returns only the array without the sandboxes "wrapper".

Additional Information:

  • docker-agent v1.151.0 (Homebrew)
  • sbx version v0.49.1 c5b19951af121b439800029695f88bf1139a0b0b
  • command run: docker-agent run ./examples/sandbox_agent.yaml

Any ideas where i could be going wrong? Thank you!

Dominant language
Go
Stars
4.7k
Forks
565
Avg merge
18h 52m
Merged PRs (30d)
221

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from docker/docker-agent

All issues in docker/docker-agent

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.