Roo-Code/packages
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
..
build Fix: Transform keybindings in nightly build to fix command+y shortcut (#8070) 2025-09-17 19:27:43 -04:00
cloud Batch settings updates from the webview to the extension host (#9165) 2025-11-12 12:29:06 -08:00
config-eslint Upgrade to ESLint 9 + share eslint config across workspaces (#3815) 2025-05-21 21:30:21 -07:00
config-typescript Move @roo-code/cloud to the Roo-Code repo (#7503) 2025-08-28 11:18:45 -07:00
evals Set port 3446 for web-evals in production mode (#8288) 2025-09-24 08:43:05 -07:00
ipc chore: add changeset for v3.31.1 (#9153) 2025-11-10 11:52:10 -05:00
telemetry Track when telemetry settings change (#8339) 2025-09-26 22:48:33 -04:00
types Migrate conversation continuity to plugin-side encrypted reasoning items (Responses API) (#9203) 2025-11-12 19:50:24 -05:00