You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Antigravity child-session fix changes root anchors and still collides across parents #5058
#5054 fixed same-parent sibling sharing by preferring _codexOwnThreadId, but the resulting identity rule is incomplete in two ways on current dev (c5b39d43e6).
Parentless root requests carry thread-id/session-id but deliberately omit x-codex-parent-thread-id. Before fix(google): give each parallel child its own Antigravity session #5054 they used the first-user-text anchor; now they use the own-thread anchor. Durable Antigravity replay state is keyed by model plus session id, so an upgrade strands the signatures stored under the old root session and can make tool-call follow-ups fail upstream.
A child thread-id is only unique within its parent. Two different parents can each have the same child id, but clientThreadAnchor() hashes only _codexOwnThreadId, so those conversations still share an upstream session.
A distinct parent/child pair derives an injective, restart-stable anchor containing both bounded identities.
Parent-only clients retain their existing stable fallback.
Raw ids never leave the proxy; the wire continues carrying only the numeric hash.
Required regressions
a real parentless root with thread-id and no parent header keeps the legacy session id;
same child id under two different parents yields different session ids;
siblings under one parent remain different;
one parent/child pair stays stable across restart, compaction and changed first-user text; and
durable thought-signature replay survives an upgrade for an existing root conversation.
Regression origin
Merged in #5054. The current comment claiming a root presents thread-id equal to its parent is inconsistent with src/server/context-history.ts, which deliberately omits the parent header for roots.
Fixed on dev by #5062. You were right on both counts, and the second one is the more serious of the two.
The collision moved rather than closing. I wrote in #5054's own commit message that a thread id is unique only within its parent, quoting codexConversationIdentity, and then anchored on the child alone. The anchor is now the pair, joined by a NUL so the encoding is injective: no Codex id contains one, so a pair cannot be re-read as a different pair or as the parent-only anchor.
And the root claim was simply false. src/server/context-history.ts says the opposite in as many words — root model requests use (session-id=root, thread-id=root) and do not fabricate a parent key — so a root carries an own thread and no parent, and #5054 handed it a brand-new anchor on the strength of a premise I had not checked. With durable replay keyed by model plus session id, that strands every signature stored under the old root session at upgrade: the exact instability the derivation exists to prevent, introduced while fixing sharing. A parentless root now keeps its pre-#5054 anchor.
All five regressions you listed are pinned, plus injectivity as its own case: (parent "a", child "b:c") and (parent "a:b", child "c") are asserted distinct, which a separator a Codex id could contain would not give.
The case I deleted is worth naming, because it is how the wrong premise survived review. #5033: a root turn is byte-identical to what it was before asserted child("hi", "thread-a", "thread-a") — a root presenting its own id as its parent. That shape does not occur, so the test passed while describing nothing real.
Activity
fix(google): key the Antigravity session on the parent/child pair (#5062
lidge-jun commentedon Sep 18, 2026
Fixed on
devby #5062. You were right on both counts, and the second one is the more serious of the two.The collision moved rather than closing. I wrote in #5054's own commit message that a thread id is unique only within its parent, quoting
codexConversationIdentity, and then anchored on the child alone. The anchor is now the pair, joined by a NUL so the encoding is injective: no Codex id contains one, so a pair cannot be re-read as a different pair or as the parent-only anchor.And the root claim was simply false.
src/server/context-history.tssays the opposite in as many words — root model requests use (session-id=root, thread-id=root) and do not fabricate a parent key — so a root carries an own thread and no parent, and #5054 handed it a brand-new anchor on the strength of a premise I had not checked. With durable replay keyed by model plus session id, that strands every signature stored under the old root session at upgrade: the exact instability the derivation exists to prevent, introduced while fixing sharing. A parentless root now keeps its pre-#5054 anchor.All five regressions you listed are pinned, plus injectivity as its own case:
(parent "a", child "b:c")and(parent "a:b", child "c")are asserted distinct, which a separator a Codex id could contain would not give.The case I deleted is worth naming, because it is how the wrong premise survived review.
#5033: a root turn is byte-identical to what it was beforeassertedchild("hi", "thread-a", "thread-a")— a root presenting its own id as its parent. That shape does not occur, so the test passed while describing nothing real.