Skip to content

ref(chat): use native Turn execution for Conversation API - #1682

Merged
dcramer merged 6 commits into
mainfrom
codex/native-api-turn-execution
Aug 25, 2026
Merged

dcramer merged 6 commits into
mainfrom
codex/native-api-turn-execution

Conversation

@dcramer

@dcramer dcramer commented Aug 25, 2026 •

Copy link
Copy Markdown
Member

The Conversation API worker now calls core executeTurn instead of calling AgentRunner and writing final Turn events itself. The worker still owns Conversation API authorization, cancellation, Conversation state, reply storage, and plugin work. Slack behavior does not change.

This is the small change described in #1563. It does not change IDs, routing, stored state, or retry and recovery rules. Existing api-turns paths and names remain for now. #1563 removes them after the native API is live.

The worker receives AgentRunner directly because the caller chooses it. It gets fixed app services from the modules that own them. Integration tests can replace only model output. They cannot replace the Junior worker or Turn event code.

Existing integration tests cover successful replies, no Slack publish, Turn events, cancellation, authorization pause and resume, ACP reconnect, and later messages. The policy changes state that an options object is still dependency injection and that a refactor must preserve error handling.

Failures after the agent finishes can still cause a second model Run. This is a real existing defect, but it needs its own design and behavior tests. #1686 tracks that work instead of adding recovery rules to this refactor.

Refs #1563

@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 6:53pm

Request Review

@dcramer dcramer changed the title ref(chat): run API Turns through native execution ref(chat): use native Turn execution for Conversation API Aug 25, 2026
@dcramer
dcramer marked this pull request as ready for review August 25, 2026 16:00
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Aug 25, 2026
@github-actions github-actions Bot added risk: high PR risk score: high and removed risk: medium PR risk score: medium labels Aug 25, 2026

@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 c3b874c. Configure here.

@dcramer
dcramer merged commit f0eb566 into main Aug 25, 2026
52 of 56 checks passed
@dcramer
dcramer deleted the codex/native-api-turn-execution branch August 25, 2026 19:30

This branch was successfully deployed

1 active deployment
Preview – junior-docs — 5692c003 Deployed Aug 25, 2026 by vercel[bot]
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