Skip to content

ref(chat): add native Turn execution - #1679

Merged
dcramer merged 1 commit into
mainfrom
codex/native-turn-execution
Aug 25, 2026
Merged

ref(chat): add native Turn execution#1679
dcramer merged 1 commit into
mainfrom
codex/native-turn-execution

Conversation

@dcramer

@dcramer dcramer commented Aug 25, 2026

Copy link
Copy Markdown
Member

Internal child work now uses the native executeTurn function. The child worker saves its result before the runtime marks the Turn complete or failed. Completed execution returns only completed, so later code cannot act on a model result that lost a race to an earlier saved result.

The runtime now owns Turn event storage directly. It does not accept an options or services object. The only passed service is AgentRunner, the model boundary used by production setup and model fakes. The child worker also takes that runner directly instead of a one-field options object.

An agent Run error follows the existing child retry rules. An error while saving the result goes back to the queue, so saved work can still be recovered.

This is a small part of #1563. It does not change routing, IDs, recovery rules, Slack, the Conversation API, or the local CLI. We can move those callers in separate changes after this boundary is proven.

The existing child-work integration scenario checks successful and failed Turn events through real Junior wiring. A focused component scenario protects the Run-error and save-error boundary.

@vercel

vercel Bot commented Aug 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview Aug 25, 2026 3:47am

Request Review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit cde1ac1. Configure here.

Comment thread packages/junior/src/chat/agent-invocations/work.ts
@dcramer
dcramer force-pushed the codex/native-turn-execution branch from 2b9212c to 6d0472c Compare August 25, 2026 03:46
@dcramer
dcramer marked this pull request as ready for review August 25, 2026 05:32
@dcramer
dcramer merged commit d148df4 into main Aug 25, 2026
38 of 40 checks passed
@dcramer
dcramer deleted the codex/native-turn-execution branch August 25, 2026 05:32
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant