fix(orchestration): create the unbound Run only for a null Run id

Claude-Session: 1fec75fd-224b-46ab-95fe-d88e0f3d9ff9
This commit is contained in:
Jinwoo-H
2026-09-09 03:05:37 -04:00
parent ff3f196295
commit 5bbd2bfca9
@@ -30,7 +30,7 @@ export function insertMessage(this: OrchestrationDb, msg: MessageInsert): Messag
// filed under the unbound Run, never the legacy one, which the schema-skew probe reads as pre-Runs.
// Created on first use so `run list` shows it only to a user who has such mail.
const runId = msg.runId ?? UNBOUND_RUN_ID
if (!msg.runId) {
if (msg.runId == null) {
this.db
.prepare(
`INSERT OR IGNORE INTO runs (id, objective, home_database, consumer_generation, legacy)