Skip to content

Support for device code auth#248

Open
anvilpete wants to merge 1 commit into
agentclientprotocol:mainfrom
anvilpete:device-code-auth
Open

Support for device code auth#248
anvilpete wants to merge 1 commit into
agentclientprotocol:mainfrom
anvilpete:device-code-auth

Conversation

@anvilpete

Copy link
Copy Markdown

This PR adds device code auth support for ChatGPT login when no browser is available. It is a re-implementation of zed-industries/codex-acp#291 for agentclientprotocol/codex-acp.

-> AuthenticateRequest
<- CreateElicitationRequest (url mode, request scope)
-> CreateElicitationResponse (accept)
<- AuthenticateResponse

An elicitation/complete isn't required, due to the AuthenticateResponse sent when authentication is complete (or an error if it failed).

Comment thread src/CodexAcpClient.ts
mode: "url",
// This should be the authenticate requestId, but this is not exposed by the ACP SDK.
// The elicitation still works, but won't be tied to the authenticate request.
requestId: null,

@anvilpete anvilpete Jun 26, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I don't think we can fill in the requestId here without support to expose it from the ACP SDK.

I think this is fine for now, but could we consider adding requestId to the AgentHandlerContext?

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