跳转到内容
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 是一套智能体编码工作台:结构化工作流、多 Agent 并行执行与 Hero Dungeon 视图,把想法变成真正交付的软件。

让想法更快变成好用的软件,让智能编码更聪明、更高效,也更有趣。

HagiCode 浅色主题主界面截图
  • Smart结构化工作流将意图转化为从想法到交付的可执行路径。
  • Efficient多 Agent 工作流让调研、实现与审阅并行推进。
  • FunHero Dungeon 让长时间编码协作更直观、更有参与感。
访问 HagiCode