콘텐츠로 이동
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 방문