Skip to content

mock ACP initialize hangs/timeouts on sandbox-agent 0.2.0 (invalid stdout + broken pipe) #186

@handfuloflight

Description

@handfuloflight

Summary

agent=mock fails ACP initialization and causes createSession to hang/time out in sandbox-agent v0.2.0.

In our Sprite environment, agent=codex works in the same server process, but agent=mock consistently fails.

Environment

  • sandbox-agent: 0.2.0
  • Deployment: server mode on Linux Sprite VM
  • Endpoint: http://127.0.0.1:2468 (same behavior through external gateway)
  • Agent path for mock (from /v1/agents?config=true): /home/sprite/.local/share/sandbox-agent/bin/mock (reported), but actual launches use .../agent_processes/mock-acp

Repro

  1. Start server:
    • sandbox-agent server --host 0.0.0.0 --port 2468 --token <TOKEN>
  2. Post ACP initialize for mock:
    • sandbox-agent api acp post --endpoint http://127.0.0.1:2468 --token <TOKEN> --server-id issue-mock-<ts> --agent mock --json '{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"protocolVersion":1,"clientInfo":{"name":"issue-probe","version":"v1"}}}'
  3. Observe timeout (operation timed out).
  4. Using SDK (SandboxAgent.connect(...).createSession({ agent: "mock" })) also times out.

Actual Behavior

  • ACP initialize does not return.
  • Session creation times out.
  • Follow-up requests can fail with broken pipe.

Expected Behavior

  • Built-in mock should respond with valid ACP JSON and allow createSession + prompt for smoke testing.

Relevant Logs

... message="create_instance: launch spec resolved, spawning" ... program="\"/home/sprite/.local/share/sandbox-agent/bin/agent_processes/mock-acp\""
... message="agent stdout: invalid JSON" ... raw="mock agent process is in-process in sandbox-agent"
... message="post: TIMEOUT waiting for agent response" method=initialize id=0 ...
... message="post: failed to write to agent stdin" ... "Broken pipe (os error 32)"

Also, sandbox-agent install-agent mock reports:

{ "alreadyInstalled": true, "artifacts": [] }

while the runtime still fails as above.

Notes

  • This appears specific to mock; in the same deployment agent=codex works end-to-end.
  • We can provide additional logs if helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions