Skip to content

Let a resumed turn carry on without a new prompt. - #4

Open
moedash wants to merge 1 commit into
mainfrom
moe/exec-continue
Open

Let a resumed turn carry on without a new prompt.#4
moedash wants to merge 1 commit into
mainfrom
moe/exec-continue

Conversation

@moedash

@moedash moedash commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

What changed?

codex exec resume <id> --continue runs a turn with no new user message, and Thread.continueTurn() / Thread.continueTurnStreamed() do the same from the TypeScript SDK.

The flag maps to the empty-input turn/start that already exists and is already tested. The SDK method reuses the turn collector that run() had, extracted into a private collect().

Why?

An external driver that retries a turn after a crash has nothing to send: the prompt is already in the rollout, and sending it again asks the model the same thing twice.

Empty input already does the right thing at the protocol level, so this is about reach rather than mechanism: codex exec resume always resolves a prompt, falling back to stdin and erroring when nothing is piped, so there was no way to get at it from the CLI or the SDK.

How did you test it?

  • Unit Tests
  • Staging
  • End to End Tests

Two CLI tests cover the flag parsing and its conflict with a prompt. cargo test -p codex-exec --lib is 63/0.

End to end: ran a thread, interrupted it, and carried the turn on with --continue. The rollout holds one copy of the prompt, so it was not asked twice.

An external driver that retries a turn after a crash has nothing to send: the prompt is
already in the rollout, and sending it again asks the same thing twice. The empty-input turn
that turn/start already supports does the right thing, so this exposes it through the CLI and
the SDK rather than adding a mechanism.
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.

1 participant