Repository navigation
feat: a saved key the agent prints is hidden before it is stored or shown - #1007
Merged
Merged
Conversation
…hown Step 2a of hiding a printed key (docs/design/secret-scrubbing.md, rev 4). Once the user saves a key through a card, Threadlines replaces it with [NAME hidden] wherever provider output would carry it into the thread, and says so in a row. - SecretScrubber: one registry of watched values per computer, in memory. A value is watched from the moment the user presses Save (as typed) and read back from its file at startup; it stays watched after its file goes. - The provider hook in ProviderService hides whole values in every event and the provider's raw message, and remembers what a question was shown with so its answer goes back under the original text. - Ingestion holds a key split across pieces where it joins them: per assistant message, and per command or thinking stream before its buffer. Plans, a child's answer and activities get a whole-value check where they are stored. - The notice row: "Hid NAME in the agent's output", once per name per turn. The provider debug logs can still hold a key in pieces, as agreed.
…pened message Astra's review of the ingestion holder: a message reopened after its tail was released could complete a key, two threads reusing a message id shared a holder, a notice line could itself hold a watched value, a session that ended dropped held text, a completion that repeats the message's only text sent it twice, and a command's held tail never reached its output. The holder is now keyed by thread and message and keeps a released tail as already-sent text; the session end and an item's end release what is held; the notice falls back to a neutral line. A side answer stopped from outside can still drop its last few held characters (documented).
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
badcuban
added a commit
that referenced
this pull request
Nov 19, 2026
Main is the brief's squash on top of #1007, and this branch already holds both, so the merge changes no code.
This branch was previously deployed
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.
A key the user saved through a card stayed out of Threadlines' records only until the agent pulled it into view: a command printing it, a tool reading the env file, the model repeating it. From there it went into the thread's events, rows and every connected app.
This is step 2a of
docs/design/secret-scrubbing.md(rev 4). Once a key is saved, Threadlines replaces it with[NAME hidden]wherever provider output would carry it into the thread, and a row says "Hid NAME in the agent's output".SecretScrubber: one registry of watched values per computer, in memory only. A value is watched from the moment the user presses Save (as typed, not the env file's quoted spelling) and read back from its file at startup; it stays watched after its file goes. Values under 8 characters, or letters or digits alone, are not watched.ProviderService.processRuntimeEventhides whole values in every event and in the provider's raw message, and remembers what a question was shown with so its answer goes back under the original text.Reviewed by GPT-6.2-Astra in four rounds; the first two showed the provider hook couldn't know when ingestion closes a message, so Fable moved the holding into ingestion (rev 4). End to end, the recorded Codex replays check that a phrase streamed in three pieces and a child's answer joined from four never reach the store.
Throughput (scripts/bench-secret-scrubber.ts): nothing watched adds a length check; with 50 watched values a reply piece costs about 0.35 µs and a 64 KB command-output event about 0.1 ms; with 200, about 1 µs and 0.4 ms. Not compared against ingestion's own time in the same run.
Known limits, in the design doc: the provider debug logs can hold a key in pieces (agreed); a side answer stopped from outside can drop its last few held characters. Step 2b (ask_user_to_run, Threadlines' own tools, read-backs, imports, failure text) is not in this PR.