Summary
The session recap — the one-sentence "where did I leave off" summary shown when a user
returns to an idle session (the recap: row in the TUI / away_recap history item,
POST /session/:id/recap in the daemon) — is generated by a side query whose system
prompt is hardcoded in English:
// packages/core/src/services/sessionRecap.ts
var RECAP_SYSTEM_PROMPT = `You generate session recaps for a programming assistant CLI.
The user stepped away and is coming back. Recap in under 40 words, 1-2 plain sentences,
no markdown. Lead with the overall goal and current task, then the one next action. ...
Output format — strict:
- Wrap your recap in <recap>...</recap> tags.
...
Example:
<recap>Debugging the auth retry race condition. Next: add deterministic timing to the integration test.</recap>`;
The recap is a standalone side query (runSideQuery, purpose session-recap, run against
the fast model) containing only the last 30 dialog messages plus this prompt. It carries
no session context, so the session system prompt (including any
permissions.autoMode.environment hint), QWEN.md/AGENTS.md, and output-language
preference cannot influence it. Because the prompt is English — with an English example
and a strict output-format block — the recap comes back in English even when the whole
conversation has been in another language (e.g. Russian).
The only settings that exist are general.showSessionRecap (on/off) and
general.sessionRecapAwayThresholdMinutes (idle threshold). There is no way to control
the recap language.
Reproduction
- Enable the recap (e.g.
"general": { "showSessionRecap": true }).
- Hold a session with several messages written in Russian (or any non-English language).
- Step away until the away threshold passes, then return to the session.
- Result: the recap is rendered in English, regardless of the conversation language or
any language-related setting.
Impact
Users whose working language is not English get the "where did I leave off" summary —
the text they rely on to re-orient after stepping away — in a different language from
the rest of the session. Same class of gap as the hardcoded explain-shell prompt
(#11791): the feature works, but only for English (and, unlike explain-shell, there is
not even a second locale).
Suggested fix
Preferred order:
- Derive the recap language from the recent user messages already included in the
side-query window (the last 30 dialog messages are right there), e.g. append an
instruction like "Write the recap in the same language the user is using."
- Honor
general.outputLanguage (or an equivalent setting) when it is set.
- At minimum, add a dedicated setting (e.g.
general.sessionRecapLanguage) with a
free-form language value interpolated into the prompt.
A local string patch (appending "Write the recap in Russian." to RECAP_SYSTEM_PROMPT)
works and is verified locally, but it breaks on every rebuild — a config-level fix is
strongly preferred.
Environment
- Standalone 0.23.3 (anchor present in
lib/chunks/chunk-BZM5U74J.js)
- Qwen Code Desktop 0.3.0 (bundled qwen-code 0.23.2; anchor present in the runtime
lib/chunks/chunk-ML7BJBOD.js), macOS (Apple M4 Pro)
- Feature location:
packages/core/src/services/sessionRecap.ts — RECAP_SYSTEM_PROMPT
- Feature flags:
general.showSessionRecap, general.sessionRecapAwayThresholdMinutes
Summary
The session recap — the one-sentence "where did I leave off" summary shown when a user
returns to an idle session (the
recap:row in the TUI /away_recaphistory item,POST /session/:id/recapin the daemon) — is generated by a side query whose systemprompt is hardcoded in English:
The recap is a standalone side query (
runSideQuery, purposesession-recap, run againstthe fast model) containing only the last 30 dialog messages plus this prompt. It carries
no session context, so the session system prompt (including any
permissions.autoMode.environmenthint), QWEN.md/AGENTS.md, and output-languagepreference cannot influence it. Because the prompt is English — with an English example
and a strict output-format block — the recap comes back in English even when the whole
conversation has been in another language (e.g. Russian).
The only settings that exist are
general.showSessionRecap(on/off) andgeneral.sessionRecapAwayThresholdMinutes(idle threshold). There is no way to controlthe recap language.
Reproduction
"general": { "showSessionRecap": true }).any language-related setting.
Impact
Users whose working language is not English get the "where did I leave off" summary —
the text they rely on to re-orient after stepping away — in a different language from
the rest of the session. Same class of gap as the hardcoded explain-shell prompt
(#11791): the feature works, but only for English (and, unlike explain-shell, there is
not even a second locale).
Suggested fix
Preferred order:
side-query window (the last 30 dialog messages are right there), e.g. append an
instruction like "Write the recap in the same language the user is using."
general.outputLanguage(or an equivalent setting) when it is set.general.sessionRecapLanguage) with afree-form language value interpolated into the prompt.
A local string patch (appending "Write the recap in Russian." to
RECAP_SYSTEM_PROMPT)works and is verified locally, but it breaks on every rebuild — a config-level fix is
strongly preferred.
Environment
lib/chunks/chunk-BZM5U74J.js)lib/chunks/chunk-ML7BJBOD.js), macOS (Apple M4 Pro)packages/core/src/services/sessionRecap.ts—RECAP_SYSTEM_PROMPTgeneral.showSessionRecap,general.sessionRecapAwayThresholdMinutes