Skip to content

Split session_id from conversation_id #104

@bgmcmullen

Description

@bgmcmullen

Problem

conversation_id is overloaded and confuses LLMs (and humans) analyzing the data. Codex
puts a real thread there; Claude has no conversation id so we shove the session id in. But a
Claude session holds the main loop + N subagents, so conversation_id is really a container of
many threads (including subagents, side chats, title generation, suggested input generation and any other api calls in the session)

Model

column Claude main Claude subagent Codex
session_id (partition key, non-null) session session metadata.session_id
conversation_id (nullable) null null thread
agent_id (nullable) null agent null
parent_thread_id (nullable, exists v5) null null parent thread

Touches

  • Schema: add session_id, conversation_id nullable, bump version.
  • message_projector.js: scope on conversation_id ?? session_id + agent_id.
  • Claude: set session_id, null conversation_id. Codex: both + parent_thread_id.
  • settle.js: group/load by session_id (only thing that breaks today).
  • dataset.js: partition by session_id.

Moves the partition key, so it's breaking — needs a cache recreate + backfill, don't bundle with
additive changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions