Skip to content

code-mode: make cell creation idempotent#29403

Closed
cconger wants to merge 1 commit into
cconger/code-mode-runtime-compact-03f2-cell-capabilitiesfrom
cconger/code-mode-runtime-compact-03f3-idempotent-create
Closed

code-mode: make cell creation idempotent#29403
cconger wants to merge 1 commit into
cconger/code-mode-runtime-compact-03f2-cell-capabilitiesfrom
cconger/code-mode-runtime-compact-03f3-idempotent-create

Conversation

@cconger

@cconger cconger commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Why

A create response can be canceled or lost after SessionRuntime admits a cell. Retrying without stable request identity can start a second cell while leaving the first undiscoverable.

What

  • Add an idempotency key to runtime cell creation.
  • Linearize concurrent creates for the same key with a shared initialization cell.
  • Return the same cell ID for a repeated matching create.
  • Reject reuse of a key across continuing and pausable cell kinds.
  • Add repeated and concurrent creation coverage.

Stack boundary

The key exists only on the transport-neutral runtime request in this PR. The session protocol still derives runtime identity internally; #29397 carries a caller-provided key across the host/core boundary. Core-generated cell IDs replace the separate key later in #29398.

Validation

  • just test -p codex-code-mode
  • Runtime regressions cover repeated and concurrent idempotent creation.

Stack parent: #29400.

@cconger cconger force-pushed the cconger/code-mode-runtime-compact-03f2-cell-capabilities branch from 55dad2b to d9bc7ff Compare June 22, 2026 06:48
@cconger cconger force-pushed the cconger/code-mode-runtime-compact-03f3-idempotent-create branch from 4ac6daf to 12e7716 Compare June 22, 2026 06:48
@cconger cconger force-pushed the cconger/code-mode-runtime-compact-03f3-idempotent-create branch from 12e7716 to bc923b0 Compare June 22, 2026 07:02
@cconger cconger closed this Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants