PostHog / PostHog/ai-plugin

OpenAI-curated PostHog plugin: OAuth callback consistently returns HTTP 400 in Codex Desktop

Open
#183 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
84
Forks
15
Avg merge
14h 34m
Merged PRs (30d)
7

Description

Summary

Installing the PostHog plugin from the OpenAI-curated marketplace succeeds, but completing the PostHog OAuth flow consistently fails when Codex Desktop submits the callback to OpenAI's connector backend.

The visible UI reports only:

We couldn't connect your account. Please try again.

Codex then automatically rolls back and uninstalls the plugin.

Environment

  • Codex Desktop release: 26.730.61639
  • macOS: 26.5.1
  • Architecture: Apple Silicon (arm64)
  • Plugin source: posthog@openai-curated-remote
  • Plugin version observed locally: 0.1.2
  • Connector ID: asdk_app_699caef2d680819188727b0ddbb349dd

Steps to reproduce

  1. Open the Codex Desktop plugin marketplace.
  2. Install the OpenAI-curated PostHog plugin.
  3. Complete the PostHog authorization flow in the browser.
  4. Return to Codex.

Expected behavior

The OAuth callback completes and the PostHog app remains installed and connected.

Actual behavior

Plugin installation initially succeeds:

plugin_install_succeeded
pluginName=plugin_asdk_app_699caef2d680819188727b0ddbb349dd
remoteMarketplaceName=openai-curated-remote

The subsequent callback request fails:

POST /aip/connectors/links/oauth/callback
status=400

{"detail":{"message":"We couldn't connect your account. Please try again.","status_code":400,"connector_id":"asdk_app_699caef2d680819188727b0ddbb349dd"}}

Failed to finish app OAuth callback

Codex then rolls back the installation:

plugin_uninstall_succeeded
pluginId=plugin_asdk_app_699caef2d680819188727b0ddbb349dd

The local reconciliation state records both oauthFailed: true and rolledBack: true.

Reproducibility

This occurred on five separate fresh installation/authorization attempts on 2026-08-07:

  • 09:06:42 UTC
  • 09:09:02 UTC
  • 09:45:01 UTC
  • 10:04:40 UTC
  • 10:07:00 UTC

The plugin installation itself succeeded every time; the failure was consistently at the OAuth callback. No PostHog provider error, token-exchange response, or more specific diagnostic was exposed in the local client logs.

Additional context

This appears to be the OpenAI-curated app/connector flow, rather than the direct GitHub-marketplace MCP installation path documented in this repository. If this report belongs in a different tracker, please point me to the appropriate owner.

Could the connector/backend logs for the connector ID and timestamps above reveal the underlying PostHog OAuth error?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the OpenAI connector/backend logs for the connector ID and timestamps listed in the report, then compare the callback failure with the documented PostHog OAuth flow. Done means identifying the underlying OAuth error and confirming whether the fix belongs in this repository or with the OpenAI connector owner.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, authentication, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.