SP-1173: reuse the CUI cover answer within a shell session - #415
Closed
Dennis Woditsch (dwoditsch) wants to merge 2 commits into
Closed
Conversation
The cover call ran once per written artifact, so a command producing several files asked several times and could write the first one before a later call failed, leaving half an export behind. The decision is now memoized on the per-run context and shared by every write. Failures are not memoized: the command still aborts without output, and the next attempt asks again. Includes-AI-Code: true Co-authored-by: Cursor <cursoragent@cursor.com>
Each command still asked the endpoint once, which is a call per command for anyone exporting repeatedly. The first successful answer is now kept in a temp-dir file keyed by profile, team and parent shell, so later commands in the same session reuse it and a reboot or a new terminal starts over. Every cache problem degrades to fetching again rather than to a wrong outcome: failures are never stored, and an entry that cannot be parsed or is missing its cover is discarded. Includes-AI-Code: true Co-authored-by: Cursor <cursoragent@cursor.com>
|
Dennis Woditsch (dwoditsch)
deleted the
feat/SP-1173-cui-marking-session-cache
branch
August 13, 2026 08:39
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.


Description
Stacked on #414.
Every file the CLI writes gets checked against the CUI cover endpoint, and until now that check ran once per file. A command writing several files asked several times, and each new command asked again. The first successful answer is now reused, both by the rest of that command and by later commands in the same shell session.
What changes for users:
The answer is kept in a file in the system temp directory that only the current user can read.
CONTENT_CLI_CUI_CACHE_DIRpoints it elsewhere, which is useful for giving a CI job its own.One consequence worth knowing: because an answer lasts for the session, turning the team's CUI setting on or off reaches an open terminal only once that answer is dropped. A new terminal, or deleting the file, picks it up straight away.
Relevant links
Checklist