At 8:57 AM on August 26, 2026, Salesforce emailed me to say that Case #474463909 was open. At 8:46 AM the next morning, Salesforce Support replied that several partners were experiencing the same issue and that Salesforce had logged it internally as a bug.
I did not write the case. I did not collect the reproduction steps. I did not spend the night reconstructing every OAuth setting we had tested. Codex had already done all of it while building the Salesforce version of ApexGenius.
Codex encountered the blocker, investigated it, ruled out our configuration, inspected Salesforce's request, respected the security boundary, documented the evidence, and escalated the issue to the vendor.
Autonomous engineering loop
The agent kept moving after the build failed.
Every stage preserves the evidence needed for the next one.
Build
Create the 2GP release path
Codex worked through the managed-package setup for ApexGenius in the agai namespace.
Package work started
Reproduce
Run namespace linking
The same OAuth failure survived the callback and connected-app corrections.
Failure made repeatable
Isolate
Inspect the real request
The Salesforce-generated request omitted both parameters required to begin PKCE.
Source ruled out
Bound
Respect the security control
The remaining PKCE setting was platform-enforced, so Codex stopped at the owner boundary.
No bypass attempted
Escalate
File the evidence
Codex packaged the org IDs, reproduction, error, prior tests, and requested action into the case.
Vendor-ready report

The autonomous package build
The job was concrete: create the new managed second-generation package lineage for ApexGenius in the registered agai namespace. This is the supported distribution path for installing and upgrading the app in subscriber Salesforce orgs.
Before Salesforce can create a namespaced managed 2GP package, the Dev Hub has to link to the org that owns the registered namespace. Codex reached that release gate and ran Salesforce's Link Namespace flow. The authorization handoff failed with one persistent error:
error=invalid_request&error_description=missing required code challengeThat error did not point to Apex, Lightning Web Components, package metadata, or a dependency in our source. It happened before package creation, inside the OAuth exchange that Salesforce uses to connect the two orgs.
What Codex ruled out first
A useful investigation starts by making the common explanations fail. Codex rebuilt the connected app using Salesforce's documented workaround, corrected the callback URLs for both enhanced-domain variants, and waited through the propagation windows that make connected-app debugging especially frustrating.
That work cleared the earlier client ID and redirect URI failures one by one. The same PKCE error remained. This mattered because it moved the investigation away from our connected-app configuration and onto the request Salesforce was generating.
The request Salesforce generated was missing PKCE
Codex inspected the actual authorization request created by the namespace linker. The destination required Proof Key for Code Exchange, but the request did not include either of the parameters required to begin that exchange:
code_challengecode_challenge_method
The broken handoff
Salesforce required PKCE, but its linker did not send PKCE.
invalid_requestDev Hub
Link Namespace
Salesforce generates the authorization URL and sends it to the namespace org.
Authorization request
Two required fields missing
code_challengeMISSING
code_challenge_methodMISSING
The error and the actual request matched exactly. This was no longer a configuration theory.
Namespace org
Request rejected
The destination enforced PKCE and correctly refused the incomplete request.
The package source never reached this failure boundary.
The blocker lived inside Salesforce's namespace-linking OAuth handoff.
Salesforce was rejecting a request created by its own namespace-linking page because that request omitted the security parameters the platform required. At that point the evidence matched the error exactly. This was no longer a theory based on a generic OAuth message.
The security boundary was part of the engineering
The remaining workaround involved disabling PKCE on the SalesforceDX Namespace Registry connected app from the Dev Hub side. That control was platform-enforced and unavailable to us in Setup.
Codex recognized the boundary. It did not attempt to bypass the platform control, weaken another connected app, or invent an unsupported route around Salesforce's security policy. It turned the investigation into a vendor escalation with a narrowly defined request for the team that owned the control.
The case Codex filed
The support case gave Salesforce a runnable starting point instead of a vague report that namespace linking was broken. It included both org IDs, the registered namespace, five exact reproduction steps, the full error, the connected-app configuration already tested, and the action Salesforce Support needed to take.

Salesforce + ChatGPT
Use ChatGPT with the Salesforce org you already run.
Salesforce confirmed the bug the next morning
Salesforce Support responded at 8:46 AM on August 27. The engineer said several partners were facing the same issue, Salesforce had logged it as a bug, and Support needed to disable PKCE on the SalesforceDX Namespace Registry connected app as the workaround.

The evidence moved overnight
From autonomous build blocker to confirmed platform bug.
Real case evidence1Aug 26 · 8:57 AM
Case #474463909 opened
Salesforce received the complete private case generated from the autonomous build investigation.
Real case evidence2Evidence attached
Five reproducible steps
Both org IDs, the agai namespace, the exact OAuth error, tested configuration, and requested action were included.
Real case evidence3Aug 27 · 8:46 AM
Salesforce confirms the bug
Support said several partners were affected, the issue was logged internally, and a platform-side workaround was required.
What to send Salesforce if your namespace link fails
If your managed 2GP work stops at the same error, capture the evidence before changing more configuration. A useful case should include:
- The 18-character org IDs for the Dev Hub and namespace org.
- The registered namespace prefix.
- The exact Link Namespace steps that reproduce the failure.
- The full OAuth error, including its query-string parameters.
- The callback URLs and connected-app changes already tested.
- A request for Salesforce Support to review the SalesforceDX Namespace Registry connected app and the enforced PKCE setting.
Keep credentials, access tokens, usernames, and private org details out of public posts. Send the complete values only through the authenticated Salesforce support case.
The package is blocked, but the release is not lost
The managed package still depends on Salesforce completing the platform-side action. That is frustrating, but it is a bounded dependency now. We know the package source is not the cause. We know which team owns the next step. Work that does not depend on the final namespace link can continue without pretending the blocker is solved.
That distinction matters in release engineering. A blocker without evidence can consume every workstream. A blocker with a reproduced cause, an owner, and an escalation path becomes one item on the release plan.
The bigger lesson is the complete engineering loop
The interesting part of this story is not that an AI agent recognized an OAuth error. The useful part is that Codex participated in the entire engineering process. It attempted the build, tested the normal fixes, inspected the failing request, established the ownership boundary, documented the evidence, and filed the escalation.
This is how powerful AI-native engineering becomes when autonomous agents can run the complete loop. Code generation is one step. The leverage arrives when the agent can keep moving through diagnosis, verification, documentation, and vendor coordination while preserving the same security and release controls a strong human engineer would use.
Frequently asked questions
What does missing required code challenge mean in Salesforce?
The OAuth destination requires Proof Key for Code Exchange, or PKCE, but the authorization request did not include the code_challenge parameters that PKCE requires. In this case, Salesforce's own namespace-linking request omitted code_challenge and code_challenge_method.
Can a Salesforce partner disable PKCE for the namespace-linking connected app?
Not in the configuration we encountered. The relevant setting was enforced by the platform and disabled in Setup. Salesforce Support told us the workaround required Support to disable PKCE on the SalesforceDX Namespace Registry connected app from the Dev Hub side.
What should a support case for this 2GP error include?
Include both org IDs, the registered namespace, the exact reproduction steps, the complete terminal or browser error, the connected-app configuration already tested, and the specific action you need Salesforce Support to take. Redact usernames, tokens, and other credentials from public copies.
Does this error mean the managed package source is broken?
No. Namespace linking is an upstream release gate. The package source can be valid while package creation remains blocked because the Dev Hub cannot complete the namespace-linking OAuth handoff.

