Keep Drive turns inside the window, retry 429s, and add a SCHEDULES modal - #10
Merged
Conversation
Turn-aware history trim plus OpenAI compaction stop a long thread from 400ing; rate-limit helpers stop a 429 from being treated as an unsupported-param fallback. Co-authored-by: Cursor <cursoragent@cursor.com>
… RAM. Daily HH:MM can be an IANA zone instead of box-local time. A tight RAM budget is a skip, not a failure. Compose can point CASE_BRAIN_URL at Drive instead of requiring a second brain binary. Co-authored-by: Cursor <cursoragent@cursor.com>
Compose points CASE_BRAIN_URL at POST /api/brain, which reuses runTurn and the box key. Scheduled runs show up as Drive threads. No second runtime on the cased image. Co-authored-by: Cursor <cursoragent@cursor.com>
List, create, run, and delete from the sidebar. Daily times keep the browser timezone. The box key from .env is what the run actually uses. Co-authored-by: Cursor <cursoragent@cursor.com>
.env.example now states the brain command order and the compaction threshold. The README notes that schedules use CASE_DRIVE_API_KEY. Co-authored-by: Cursor <cursoragent@cursor.com>
…cased hangs up. A no-tz daily path that froze today's offset fired an hour off on the switch day. Naive local time lets astimezone pick the fire date's offset. When the scheduler closes the socket the Drive turn now stops with it, instead of spending the box key against a computer being put to sleep. Co-authored-by: Cursor <cursoragent@cursor.com>
The sidebar used to show the first 72 characters of the prompt. The scheduler now sends the name, so a run called "morning sweep" shows up as that. The HTTP brain also clips its summary like the argv path, so the logbook stays bounded. Co-authored-by: Cursor <cursoragent@cursor.com>
A suffix cut between batched calls used to leave an output whose call was gone, which 400s the next Responses request. Daily HH:MM that does not exist on a spring-forward day now fires the next day that has that time, instead of an hour later. Co-authored-by: Cursor <cursoragent@cursor.com>
The wall-clock check ran before jitter, so 01:45 plus a few minutes could become a time that never existed that morning. Co-authored-by: Cursor <cursoragent@cursor.com>
Collaborator
Author
|
Jitter-after-DST: |
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
POST /api/brain, which reusesrunTurnandCASE_DRIVE_API_KEY— no second runtime on the cased image.Made with Cursor
Greptile Summary
The PR keeps Drive history within provider limits, retries provider throttling, and adds timezone-aware scheduled Drive runs.
Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains.
Important Files Changed
Sequence Diagram
sequenceDiagram participant User participant UI as Drive UI participant Cased as Control Plane participant Scheduler participant Brain as POST /api/brain participant Provider User->>UI: Create schedule UI->>Cased: POST schedule with prompt, time, timezone Cased->>Scheduler: Persist next valid UTC run Scheduler->>Scheduler: Detect due schedule and check resources Scheduler->>Brain: POST computer_id, prompt, name Brain->>Provider: Run Drive turn with box credentials Provider-->>Brain: Responses and tool calls Brain-->>Scheduler: Completion summary Scheduler->>Cased: Persist run status and next runReviews (3): Last reviewed commit: "Keep daily jitter from landing in a DST ..." | Re-trigger Greptile