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.
Problem
conversation_idis overloaded and confuses LLMs (and humans) analyzing the data. Codexputs 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_idis really a container ofmany threads (including subagents, side chats, title generation, suggested input generation and any other api calls in the session)
Model
session_id(partition key, non-null)metadata.session_idconversation_id(nullable)agent_id(nullable)parent_thread_id(nullable, exists v5)Touches
session_id,conversation_idnullable, bump version.message_projector.js: scope onconversation_id ?? session_id+agent_id.session_id, nullconversation_id. Codex: both +parent_thread_id.settle.js: group/load bysession_id(only thing that breaks today).dataset.js: partition bysession_id.Moves the partition key, so it's breaking — needs a cache recreate + backfill, don't bundle with
additive changes.