Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughMoves the status API in-process, adds SSE Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant API as API Server
participant Sandbox as Modal Sandbox
participant Volume as Modal Volume
participant ActionLog as In-memory Action Log
Client->>API: POST /runs
API->>Sandbox: create sandbox & start agent
Sandbox->>ActionLog: init_status() (STARTING)
loop actions
Sandbox->>API: push_action()
API->>ActionLog: append action (step N)
end
Client->>API: GET /runs/{id}/stream (may include Last-Event-ID)
API->>ActionLog: replay actions with step > Last-Event-ID
API->>Client: SSE events (id: step, data: {...})
Sandbox->>API: complete_run()
API->>Volume: persist_status(/recordings/{run_id}/status.json)
API->>Client: SSE event=complete (final status)
Note right of Client: Later reconnect
Client->>API: GET /runs/{id}/stream
API->>Sandbox: attempt reconstruct via Sandbox.from_id()
alt reconstruct fails or sandbox exited
API->>Volume: load status.json
API->>Client: replay persisted actions + complete event
else reconstruct succeeds
API->>Sandbox: proxy live events
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
This was referenced Mar 30, 2026
This was referenced Apr 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sharing no state)
Key changes
volume
loop
_replay_persisted_events() for volume fallback, recordings volume mounted on API server
Test plan
post-termination event replay, Last-Event-ID filtering, stop endpoint
Summary by CodeRabbit
New Features
Documentation
Bug Fixes
Tests