跳到內容
OmniRoute source

OpenCode conversation identity

OpenCode and OpenCode Go reuse explicit conversation IDs across turns. The resolver checks x-opencode-session, existing affinity/session headers, native CLI session/thread headers, request metadata, and then top-level session/thread fields. Claude’s JSON-encoded metadata.user_id is inspected for a session ID; an opaque account/user ID alone is never treated as a conversation ID.

Values containing control characters, empty IDs and IDs longer than 256 characters are ignored. JSON metadata parsing is bounded. Before translation, the executor header normalizer preserves this identity only for the OpenCode providers; it does not inject OpenCode headers for other providers.

The existing canonical ses_ encoding and conversation fingerprint fallback remain unchanged. With no explicit ID, the first user message and other existing fingerprint inputs continue to determine continuity. This is not a new authorization boundary or proof of upstream content isolation.

The implementation lives in open-sse/utils/opencodeSessionIdentity.ts, open-sse/utils/opencodeHeaders.ts and open-sse/handlers/chatCore/executorClientHeaders.ts. Regression tests cover native IDs, Claude metadata, precedence, invalid values and the existing fingerprint behavior without paid upstream calls.


OmniRoute 原始碼 (a58000c7685f)

HagiCode

HagiCode 是智慧代理程式開發工作台,結合結構化工作流程、多代理程式執行與 Hero Dungeon 介面,將想法化為交付成果。

以更聰明、更快速且更有趣的智慧代理程式工作流程,打造實用的軟體。

HagiCode 淺色主題介面畫面
  • Smart結構化流程將意圖轉化為從構想到交付的可執行步驟。
  • Efficient多代理程式工作流程讓研究、實作與審查並行進行。
  • FunHero Dungeon 讓長時間的程式協作更直覺、更有參與感。
造訪 HagiCode