fix(codex): send X-Molecule-Org-Id on auth re-sync GET (follow-up to #66) #67
Reference in New Issue
Block a user
Delete Branch "fix/codex-resync-org-header"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes the re-sync GET 400 (TENANT_ORG_HEADER_REQUIRED) so agents pick up centrally-rotated tokens. One-line header add, resolved from MOLECULE_ORG_ID. shellcheck clean. Not a burn risk and doesn't block activation (boot-injection works) — but required for robustness at the ~10-day rotation boundary.
codex_auth_sync.sh's GET /workspaces/$WID/secrets/values was missing the X-Molecule-Org-Id header that the SaaS tenant API requires (TENANT_ORG_HEADER_REQUIRED), so every re-sync 400'd ("missing tenant routing header"). Without a working re-sync the agents cannot pick up the token the platform central refresher rotates near expiry — they would wedge at the ~10-day rotation boundary. Resolve the org UUID from MOLECULE_ORG_ID (already in the agent env; start.sh/codex_mcp_config.sh use the same header) and send it. Follow-up to #66 (GET-only re-sync). Boot-time token injection was unaffected; this only fixes the ongoing hourly re-sync. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>Approve: one-line org-header fix, shellcheck clean, closes the re-sync 400 (TENANT_ORG_HEADER_REQUIRED) for rotation pickup.
Approve: one-line org-header fix, shellcheck clean, closes the re-sync 400 (TENANT_ORG_HEADER_REQUIRED) for rotation pickup.