Skip to content

agents: add size_slug convenience property to AgentSession - #724

Open
mishraishika24-pixel wants to merge 1 commit into
mainfrom
marsohs-1076-size-slug-property
Open

mishraishika24-pixel wants to merge 1 commit into
mainfrom
marsohs-1076-size-slug-property

Conversation

@mishraishika24-pixel

@mishraishika24-pixel mishraishika24-pixel commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

MARSOHS-1076: harness-api now persists and returns the effective sandbox size a session booted at (session.size_slug, e.g. "mars-2vcpu-4gb").

pydo's hosted-agents layer (src/pydo/agents/) is hand-written and untyped: SessionsOperations.get() returns the raw JSON dict verbatim, so the new field already flows through unmodified. This PR only adds a size_slug convenience property to AgentSession / AsyncAgentSession, mirroring the existing agent_kind property.

Server change: digitalocean/cthulhu#175680.

Changes

  • src/pydo/agents/session.py / src/pydo/aio/agents/session.py: size_slug property reading info.get("size_slug"); None when absent.
  • tests/agents/test_session_highlevel.py: sync + async tests (present, absent).

Rebased onto current main; the earlier version of this branch was stacked on unmerged OHS_endpoints history and showed ~30k unrelated lines.

Testing

pytest tests/agents/: 175 passed. black --check (24.x, as pinned) clean.

Base automatically changed from OHS_endpoints to main September 22, 2026 04:16
harness-api now persists and returns the effective sandbox size a session
actually booted at (session.size_slug, e.g. "mars-2vcpu-4gb"). pydo's
hosted-agents layer is hand-written and untyped — SessionsOperations.get()
returns the raw JSON dict verbatim — so the field already flows through
unmodified. Add a size_slug property to AgentSession / AsyncAgentSession,
mirroring the existing agent_kind accessor; None when absent (no sandbox yet,
or a session predating the field).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@mishraishika24-pixel
mishraishika24-pixel force-pushed the marsohs-1076-size-slug-property branch from 29f86e8 to c200ae6 Compare October 1, 2026 06:47
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.

1 participant