Runtime architecture

The hard part is preserving Codex agent semantics.

CodeSeeX classifies requests, adapts DeepSeek provider behavior, owns hosted tools, and keeps usage explainable without becoming a second transcript store.

  • Request classes stay distinct: user turns, service requests, compaction, handoff loops, and final responses.
  • DeepSeek tool protocol is consumed at the provider boundary and converted into standard tool events.
  • Usage and logs explain what happened without storing full prompts by default.
Runtime layers

Runtime layers

Codex Desktop -> local adapter -> agent bridge -> provider adapter -> manager runtime.

/v1

Codex-facing API

OpenAI-compatible /v1 endpoints, generated catalog, and local capability boundary.

BRIDGE

Agent bridge

Request classification, client tool handoff, context compilation, and replay controls.

PROVIDER

Provider adapter

DeepSeek streaming, reasoning, DSML tool protocol parsing, and usage normalization.

DESKTOP

Manager runtime

Status, logs, usage, settings, balance, update checks, and tray operations.

Context and state boundaries

Context and state boundaries

Codex owns the conversation transcript. CodeSeeX keeps only current-process bridge state and bounded diagnostics needed to finish requests and explain runtime behavior.

  • Full-context requests are used for the current upstream call, not duplicated as durable conversation storage.
  • Tool facts are scoped evidence for CodeSeeX-owned execution, not a replacement for the Codex transcript.
  • Tool output, visible thinking, binary payloads, and compact material are bounded before replay.
CodeSeeX usage view
Provider protocol handling

Provider protocol handling

DeepSeek-specific protocol text is treated as provider protocol, not user-visible prose. When tools are available it becomes standard tool calls; otherwise it is consumed at the safety boundary.

Usage that follows user work

Usage that follows user work

Billable upstream calls are grouped into user sessions with model iterations, tool phases, client handoffs, service requests, cache hits, misses, output, latency, and estimated cost.

Logs for causality, not raw dumps

Logs for causality, not raw dumps

Safe diagnostic logs show categories, severity, request IDs, source probes, context warnings, and protocol events without exposing prompt payloads by default.

Ready to route Codex through DeepSeek with a real agent boundary?

Start with the generated TOML, keep the manager open for observability, and use the docs when you need to reason about tools, state, or privacy.