ChatGPTClaudeGrok / X / CursorGemini

DSH plugin title state: auxiliary requests, providers

Plugin DevelopmentPublished 2026-11-12Author: DeepSeek Plugin Market
DSH pluginDeepSeek Harnesssession titlesession/titleSessionTitleService
A title that stops updating or vanishes on restart. Covers session/title folding, source pinning, auxiliary request records, and rename versus refresh.

A title that freezes after one generation is usually pinned, not broken. DSH plugin stores titles as session/title events folded into durable state. The source decides whether it can still update, and the event decides whether it survives a restart.

Title is log state, not a session field

ctx.sessionTitle.get() reads a fold where the latest event wins.(source)

session/title is log-only, and its payload carries three things:

  1. title — the normalized non-empty text;
  2. messageSeqs — the exact human message seqs used, empty for an explicit rename;
  3. source — built-in fallback, a registered provider, or the user.

The fold adds two envelope facts: eventSeq and updatedAt, the latest session/title seq and timestamp. To answer “when did the title change”, read updatedAt, not the session creation time.

Compatibility is deliberate: the version 1 projection and the client view keep only the title string or null. Old persisted cache rows stay readable without migration, but you also cannot read source or messageSeqs from that projection.

Why last-write-wins instead of “first title sticks”? Because each accepted revision appends a new event and the fold always takes the newest. Renaming never deletes history, and you can watch how a title evolved. Use get() when you need full provenance, and the projection when a list needs fast text.

That is also why a null in the projection must not be read as “this session never had a title”. It only means the version 1 projection holds no display string.

The three sources decide updates

Whether a title keeps changing depends on source.kind, not on provider presence.(source)

  • fallback — built-in generation with no model involved;
  • provider — generated by a registered provider, carrying a SessionTitleProviderId and optionally the provider/model identity;
  • user — an explicit rename that pins the title.

The user arm is explicit in the source: an explicit rename pins the title and stops automatic scheduling. That explains two scenes. A frozen title after renaming is expected, and a late automatic result after pinning means a request was still in flight; the documented behavior is that in-flight generation is superseded.

Why auxiliary request records exist separately

They record what the request sent, not what the title became.(source)

The shared execution module records each validated, dispatchable title request before calling the model. The contract is strict: even if generation later fails, the payload reproduces the model-visible system input and message input, the route, the output cap, resolved reasoning effort, provider attribution, and source message attribution.

Fields map one to one: titleProvider, messageSeqs, route, system, messages, maxTokens, and optional reasoningEffort. Effort is recorded only when known, so older requests may omit it.

The record earns its keep in two situations: diagnosing why a title read the way it did, and auditing which provider and messages produced it.

What a provider receives and what the service accepts

Provider output is a candidate; normalization and acceptance belong to the service.(source)

Before each provider call, the service creates a snapshot: eligible messages through a revision, the ensured fallback, and the latest accepted title. SessionTitleProviderRequest carries session, messages (each a seq plus concatenated text), optional route, optional currentTitle, and a signal for supersession, disposal, timeout composition, or caller cancellation.

Eligibility is narrow: only human text messages. SessionTitleUserMessage is a source user/message seq plus concatenated text, so a very short session or a tool-only session yields no usable text and get() keeps returning undefined. That is not a failure; there is simply no eligible input.

SessionTitleProviderResult has three fields: title, messageSeqs, and optional model. The hard constraint: returned seqs must come from that request's messages. The service validates order, normalizes the title, enforces a byte cap, and appends the title with its source seqs and type.

automatic decides when new human prompts trigger generation, either first-prompt or all-prompts. A provider declares one cadence, and only one optional provider can be registered.

get, rename, refresh

Read with get, pin with rename, unpin deliberately with refresh.(source)

  • get(session) returns the latest snapshot, or undefined before eligible input. It triggers nothing.
  • rename(session, title) appends a source: user event, pinning the title, superseding in-flight generation, and scheduling none for later messages. A title that normalizes to empty throws SessionTitleInvalidError; an inactive session or disposed service throws an ordinary Error.
  • refresh(session, signal?) explicitly retries the registered provider or materializes the built-in fallback. It is the deliberate unpin path and returns undefined with no eligible text.

All three return a snapshot or undefined; there is no half-success. If you need “rename then regenerate”, call rename followed by refresh, because automatic generation will not come back on its own.

Registration and late results

Single-provider resource; disposal semantics decide whether stale titles land.(source)

register(provider) registers the sole optional provider and returns a Cordis effect disposer. Disposal aborts all pending and active work, a replacement may register once disposal has started, and the closing provider's late results never commit.

That last sentence is a design constraint, not an accident. If a hot swap suddenly restores an old title, check whether the old generate returned and tried to commit after its signal aborted. Respect the signal and let the service make the acceptance decision.

The disposer settles after active calls quiesce, which affects unload order: await it before tearing down downstream services, or a late callback can hit a destroyed context.

Validation: rename, restart, re-read

Check state, timing, and source together; one alone is not enough.(source)

  1. On a new session, call get() and assert undefined with no session/title event.
  2. Trigger first generation and assert source.kind is provider or fallback with non-empty messageSeqs.
  3. Call rename(session, " ") and assert SessionTitleInvalidError with no new event.
  4. Call rename(session, "Pre-release checks") and assert source.kind is user, messageSeqs empty, and updatedAt advanced.
  5. Restart and call get() again; assert the title and eventSeq match.
  6. Call refresh() and assert regeneration, with a source that is no longer user.

If step 6 changes nothing, confirm a provider is registered; otherwise refresh materializes the fallback, which may coincidentally produce the same text. Read source before the string.

For provider wiring, see title provider; for reference labels, see session reference label.

One line to close: titles fold from log state, a user source pins them, auxiliary records preserve input rather than outcome, and a replaced provider's late results never commit.

ChatGPTClaudeGrok / X / CursorGemini

FAQ

Is a DSH plugin session title a field on the session object?

No. DSH plugin stores titles as log events and folds them. session/title is log-only, and ctx.sessionTitle.get() returns the latest fold, so a restart reads the same log.

Does DSH plugin auto-title after a manual rename?

No. DSH plugin rename marks the source as user, which pins the title. DSH plugin then supersedes in-flight generation, and later user messages schedule none.

Does a DSH plugin auxiliary request survive failure?

Yes. DSH plugin records the validated, dispatchable request before calling the model, reproducing system input, message input, route, output cap, effort, and attribution even if generation later fails.

Do late DSH plugin title results still commit?

No. DSH plugin never commits late results from a closing provider, and its disposer settles after active calls quiesce. A replacement may register once disposal has started.

Related Terms

SessionTitleSource
SessionTitleSource records where a title came from: fallback, provider with an identifier, or user, which pins the title.— packages/session/session-title/src/index.ts
SessionTitleSnapshot
SessionTitleSnapshot is the latest folded title plus envelope facts: title, messageSeqs, source, eventSeq, and updatedAt.— packages/session/session-title/src/index.ts
SessionTitleAutomaticMode
SessionTitleAutomaticMode is a provider-owned generation cadence with only first-prompt and all-prompts values.— packages/session/session-title/src/index.ts
auxiliary request record
An auxiliary request record is the event written before a title model call, reproducing system and message input, route, cap, and attribution.— DeepSeek Harness reference - Session titles

Sources