Skip to content

return promptRequired when no turn is running - #363

Open
lifeizhou-ap wants to merge 2 commits into
agentclientprotocol:mainfrom
lifeizhou-ap:lifei/steering-prompt-required
Open

return promptRequired when no turn is running#363
lifeizhou-ap wants to merge 2 commits into
agentclientprotocol:mainfrom
lifeizhou-ap:lifei/steering-prompt-required

Conversation

@lifeizhou-ap

Copy link
Copy Markdown

Summary

A steering request can arrive just as the active turn ends. Codex ACP currently starts a new turn itself and returns startedNewTurn, leaving the client without a normal session/prompt request to await or cancel.

This PR adds the opt-in behavior introduced in Claude ACP #919.

When the client sends:

{
  "_meta": {
    "steering": {
      "idleBehavior": "promptRequired"
    }
  }
}

Codex ACP:

  • Returns injected if a turn is running.
  • Returns promptRequired if the turn has ended, without starting another turn.
  • Allows the client to submit the message through session/prompt.
  • Preserves startedNewTurn when the option is not provided.

Verification

  • npm run typecheck
  • npm test
  • npm run build
  • npm run example:steering

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