Roo-Code/src/core
Hannes Rudolph 0fdbd392e8
Migrate conversation continuity to plugin-side encrypted reasoning items (Responses API) (#9203)
* Migrate conversation continuity to plugin-side encrypted reasoning items (Responses API)

Summary
We moved continuity off OpenAI servers and now maintain conversation state locally by persisting and replaying encrypted reasoning items. Requests are stateless (store=false) while retaining the performance/caching benefits of the Responses API.

Why
This aligns with how Roo manages context and simplifies our Responses API implementation while keeping all the benefits of continuity, caching, and latency improvements.

What changed
- All OpenAI models now use the Responses API; system instructions are passed via the top-level instructions field; requests include store=false and include=["reasoning.encrypted_content"].
- We persist encrypted reasoning items (type: "reasoning", encrypted_content, optional id) into API history and replay them on subsequent turns.
- Reasoning summaries default to summary: "auto" when supported; text.verbosity only when supported.
- Atomic persistence via safeWriteJson.

Removed
- previous_response_id flows, suppressPreviousResponseId/skipPrevResponseIdOnce, persistGpt5Metadata(), and GPT‑5 response ID metadata in UI messages.

Kept
- taskId and mode metadata for cross-provider features.

Result
- ZDR-friendly, stateless continuity with equal or better performance and a simpler codepath.

* fix(webview): remove unused metadata prop from ReasoningBlock render

* Responses API: retain response id for troubleshooting (not continuity)

Continuity is stateless via encrypted reasoning items that we persist and replay. We now capture the top-level response id in OpenAiNativeHandler and persist the assistant message id into api_conversation_history.json solely for debugging/correlation with provider logs; it is not used for continuity or control flow.

Also: silence request-body debug logging to avoid leaking prompts.

* remove DEPRECATED tests

* chore: remove unused Task types file to satisfy knip CI

* fix(task): properly type cleanConversationHistory and createMessage args in Task to address Dan's review
2025-11-12 19:50:24 -05:00
..
assistant-message fix: remove search_and_replace tool from codebase (#8892) 2025-10-30 22:51:29 -04:00
auto-approval Move auto-approval from ChatView to Task (#9157) 2025-11-10 17:01:50 -08:00
checkpoints Fix checkpoints test (#8803) 2025-10-24 10:18:19 -04:00
condense Enable browser-use tool for all image-capable models (#8121) 2025-10-21 22:23:42 -04:00
config feat: auto-switch to imported mode with architect fallback (#9003) 2025-11-06 16:40:27 -05:00
context/context-management Move @roo-code/cloud to the Roo-Code repo (#7503) 2025-08-28 11:18:45 -07:00
context-tracking fix: use safeWriteJson for all JSON file writes with race condition fix (#4733) 2025-06-25 16:05:02 -04:00
diff feat(chat): Improve diff appearance in main chat view (#8932) 2025-11-06 16:18:01 -05:00
environment feat: add settings to configure time and cost in system prompt (#8451) 2025-10-27 18:40:16 -04:00
ignore Follow symlinks in rooignore checks (#7405) 2025-08-26 10:12:20 -04:00
mentions fix: identify mcp and slash command config path in multiple folder workspace (#6904) 2025-09-05 14:52:48 -04:00
message-queue Move message queue to the extension host (#7604) 2025-09-02 19:12:18 -07:00
prompts Add native tool definitions (#9156) 2025-11-10 17:31:05 -05:00
protect Mark code-workspace files as protected (#7403) 2025-08-26 00:09:14 -04:00
sliding-window Feat: Adding Gemini tools - URL Context and Grounding with Google Search (#5959) 2025-07-27 14:34:55 -04:00
task Migrate conversation continuity to plugin-side encrypted reasoning items (Responses API) (#9203) 2025-11-12 19:50:24 -05:00
task-persistence Migrate conversation continuity to plugin-side encrypted reasoning items (Responses API) (#9203) 2025-11-12 19:50:24 -05:00
tools fix: prevent command_output ask from blocking in cloud/headless environments (#9152) 2025-11-10 11:47:26 -05:00
webview fix: Apply updated API profile settings when provider/model unchanged (#9208) (#9210) 2025-11-12 19:45:51 -05:00