Let Drive finish long turns: steer, stop, and keep context cheap - #4
Merged
Conversation
A mid-turn message injects at the next round, STOP aborts the model stream, and screenshots/exec output stay as disk pointers so 200-round turns do not balloon the prefix cache. Co-authored-by: Cursor <cursoragent@cursor.com>
6 tasks
Partial fills no longer post the form, upload treats `..` as a path segment not a substring, and CASE_TURN_TOKENS now stops Claude turns too. Co-authored-by: Cursor <cursoragent@cursor.com>
Disconnect already aborted OpenAI. Anthropic kept the stream and the rate-limit sleep alive, so STOP still billed and held the thread busy. Co-authored-by: Cursor <cursoragent@cursor.com>
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
/api/chat/steerand land at the next round; leftovers persist if the turn ends. STOP / disconnect aborts the in-flight model stream, not just tools.CASE_TURN_TOKENS(default 2M) as the spend ceiling. OpenAI requests useprompt_cache_keyper thread./tmpand history keeps a pointer; unchanged snapshots/screenshots are elided; long clips keep head and tail. Screenshots persist under~/.case/drive/shots(Compose:CASE_HOME=/dataon theui-datavolume)./,/index.html,/deploy). Provider rounds retry on 429/529.Stacked on #3. Merge that first, then retarget this PR to
main.Test plan
node web/web-ui/test_serve.mjscomputer_execshows a head +full_outputpath, not the whole log/serve.mjsand/threads.json404;/and/deploystill loadthreads.jsononui-dataMade with Cursor