DSH plugin reference privacy: metadata out, content budgeted
In DSH plugin, referencing a session exposes two layers, not "the whole chat": candidate metadata at selection, and budgeted content at preparation. Separating the layers shows what to mask in the UI and what to promise in docs.
DeepSeek Harness: Will referencing expose the whole chat?
No, but it is not "nothing" either. (source) Two stages matter:
Selection: candidate metadata only, no messages
Preparation: budgeted reads, possibly compacted or truncated
What users actually worry about is the second stage: now that it reads, does it read everything?
The answer is "read as much as the budget allows, omit the rest, and record the facts". A product promise should therefore be "read on demand with omissions marked", not "never read".
DeepSeek Harness: Six metadata fields
Six fields, none containing message content. (source) Comparison:
| Field | What it may leak |
|---|---|
sessionId | Opaque identifier, no semantics by itself |
label | A title may contain project or task names |
displayTitle | A subagent role name |
cwd | A path may contain user names and directory structure |
sameWorkspace | Only whether the directory matches |
createdAt | Timing information |
cwd and titles deserve the most care: they are not chat content, yet they can contain sensitive words.
This is also why sameWorkspace exists: hosts that only need a match flag do not have to display full paths.
DeepSeek Harness: Why candidates carry no messages
Because discovery is built to choose a session, not to read one. (source) Three reasons:
- Candidates regenerate at keystroke rate, and content would mean reading logs on every character;
- Candidates span sessions, and content would widen the exposed surface;
- Content reads need a budget, while candidates have no budget concept.
The third is structural: without a capacity parameter, a candidate cannot decide how much content is appropriate.
So candidates answer "which sessions exist", not "what was said inside".
DeepSeek Harness: How prepare reads within a budget
The budget decides how much; the source decides what is available. (source) Boundary:
- Automatic budgets come from the last assembled route or agent options;
- Missing capacity information falls back to 64 KiB;
- Exceeding the budget truncates and records omission facts;
- A compacted source contributes its own gap.
This means referencing a very long session neither expands context without limit nor silently fills it.
Users should see an "omitted" notice instead of assuming everything was read.
DeepSeek Harness: Minimal display principles
The fewer fields needed to choose, the better. (source) Three rules:
- Show a title or role name in the list, not a full cwd;
- For location, group by same directory, other directory, and unknown;
- After referencing, show "from another session" plus omission state.
The third balances safety and trust: users know where the material came from and whether it is complete.
If a product must display a path, abbreviate its middle so user names do not surface.
DeepSeek Harness: A five-item checklist
Five checks cover candidates, reading, and display. Checklist:
- Candidate responses contain no message content fields;
- Searching candidates with chat wording returns nothing;
- Referencing a long session makes
truncatedand the omission size visible; - The UI never shows a full cwd, or masks it;
- The reference card states its source and omission state.
Items 1 and 2 are interface assertions, item 3 is a preparation assertion, and items 4 and 5 are display assertions.
All three layers must pass for a privacy promise to hold.
One more note: omission state is itself information — it tells users that content was not read without exposing what that content was.
After privacy comes the persistent record. Read what a DSH plugin recall record is; for untrusted context, read why DSH plugin marks references untrusted; for the wider picture, read how DSH plugin implements session references.
Sources: DeepSeek Harness reference - Session references, session-reference/src/types.ts
FAQ
No, DSH plugin exposes candidate metadata and budgeted content rather than the whole conversation. Only metadata appears at selection; content is read later within a budget that may compact or truncate it. The right promise is read on demand with omissions marked, not never read.
DSH plugin candidates expose six fields: sessionId, label, displayTitle, cwd, sameWorkspace, and createdAt. None contains messages, but cwd and titles can include user names or project details.
Because DSH plugin discovery is designed to choose a session, not read one. Candidates fire at keystroke rate, span sessions, and have no budget concept, so carrying content would be expensive and overexposing.
Usually not in DSH plugin. Group by same directory, other directory, and unknown instead, or abbreviate the middle of the path so user names and internal structure do not surface.
Related Terms
- candidate metadata
- Candidate metadata is the six non-message fields returned during selection: sessionId, label, displayTitle, cwd, sameWorkspace, and createdAt.— DeepSeek Harness reference - Session references
- budgeted read
- A budgeted read loads referenced content within the preparation budget and records any omission.— DeepSeek Harness reference - Session references
- minimal display
- Minimal display shows only the fields needed to choose, keeping full paths and message content out of the interface.— DeepSeek Harness reference - Session references
- omission state
- Omission state tells users that some content was not read without revealing what it was.— session-reference/src/types.ts
Sources
- DeepSeek Harness reference - Session references· deepseek-ai
- session-reference/src/types.ts· deepseek-ai