Skip to content

OpenShellSpawner: update for openshell SDK 0.0.111 API changes #170

Closed

Description

@jameswnl

Problem

`OpenShellSpawner._do_spawn()` calls `self._client.create(spec=spec)` (line 386) but openshell SDK 0.0.111 requires `workspace` as a mandatory keyword argument:

```python

Current (fails with SDK 0.0.111)

sandbox_ref = await asyncio.to_thread(self._client.create, spec=spec)

Expected

sandbox_ref = await asyncio.to_thread(
self._client.create, workspace="default", spec=spec, name=sandbox_name
)
```

Similarly, `wait_ready` and `delete` need `workspace` parameter.

Impact

Testing spawn:ephemeral via OpenShell gateway fails — `create` returns `None` instead of a `SandboxRef`.

Discovered during

Testing all three spawn modes (none, local, ephemeral) E2E through lightspeed-stack's harness branch. spawn:none and spawn:local work. spawn:ephemeral works via PodmanSpawner but not via OpenShellSpawner.

Activity

  1. beesarmy commented on Aug 24, 2026

    @beesarmy
    Collaborator

    Triage

    Summary: Update OpenShellSpawner API calls for openshell SDK 0.0.111 requiring workspace parameter.

    Affected components:

    • src/cloud_agents/spawner/openshell_spawner.py — L388-402, L464

    Verification against current code: The "Current (fails)" snippet in the issue body does not match the actual code on main. The current code already passes workspace=self._workspace:

    • L389: self._client.create, workspace=self._workspace, spec=spec
    • L400: workspace=self._workspace
    • L464: self._client.delete, sandbox_name, workspace=self._workspace

    Assessment: This fix appears to already be in place. If spawn:ephemeral via OpenShellSpawner is still failing, the root cause is likely something else — possibly self._workspace being unset or the wrong value, or a different SDK 0.0.111 breaking change not covered here. Recommend:

    1. Verify self._workspace is initialized correctly (check __init__ for the default)
    2. Check if SDK 0.0.111 changed other method signatures beyond workspace
    3. If the fix is genuinely already merged, close this issue

    Related issues:

    Suggested labels: area/spawner, needs-investigation


    🤖 Triaged by beesarmy via Claude Code

  2. added a commit that references this issue on Aug 24, 2026
  3. jameswnl commented on Aug 24, 2026

    @jameswnl
    CollaboratorAuthor

    Post-fix: OpenShell sandbox container crashes on start

    PR #171 fixed the SDK API (workspace parameter). But the sandbox container exits with code 1 immediately after creation.

    Root cause investigation

    The sandbox image (lightspeed-agentic-sandbox) has:

    ENTRYPOINT ["/usr/bin/catatonit", "--"]
    CMD ["python3.12", "-m", "uvicorn", "lightspeed_agentic.app:app", "--host", "0.0.0.0", "--port", "8080"]

    OpenShell's SandboxTemplate has no command/entrypoint fields — it uses the image's default CMD. The gateway's supervisor process wraps the container lifecycle and may conflict with catatonit.

    What works vs what doesn't

    Spawner Status Why
    PodmanSpawner ✅ Runs container directly, image CMD starts uvicorn
    OpenShellSpawner ❌ Container exits code 1 — supervisor/catatonit conflict

    Next steps

    1. Test with a simpler entrypoint in the sandbox image (remove catatonit)
    2. Check OpenShell gateway logs for supervisor error details
    3. May need to customize the sandbox image for OpenShell compatibility

    Work continues on jameswnl/lightspeed-agentic-sandbox fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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