Skip to content

fix(codex): restore gateway models after reconnect#3566

Merged
richardsolomou merged 5 commits into
mainfrom
posthog-code/fix-restored-codex-model-list
Jul 20, 2026
Merged

fix(codex): restore gateway models after reconnect#3566
richardsolomou merged 5 commits into
mainfrom
posthog-code/fix-restored-codex-model-list

Conversation

@richardsolomou

@richardsolomou richardsolomou commented Jul 19, 2026

Copy link
Copy Markdown
Member

Problem

Local and worktree Codex sessions can receive stale or failed native model/list results after reconnecting or being unarchived. Current gateway models then disappear from the picker, while unauthenticated catalogs can also lose plan restriction metadata.

Changes

I use the authenticated gateway catalog as the authoritative Codex model list, retain native labels when available, and keep restricted models behind the existing upgrade gate. The gateway catalog remains available when native discovery fails, and unavailable persisted selections are ignored.

How did you test this?

  • Ran the full @posthog/agent test suite (1,405 passed) and focused regression tests (29 passed).
  • Ran pnpm --filter @posthog/agent typecheck and pnpm --filter @posthog/agent build.
  • Unarchived a real local Codex task in the dev Electron app, confirmed all GPT-5.6 variants appeared alongside GPT-5.5, then restored the task to archived state.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code

Use the gateway model catalog when the native app-server returns stale model metadata.

Generated-By: PostHog Code
Task-Id: dfa9be76-95bf-4166-8adc-529483e3d525
@trunk-io

trunk-io Bot commented Jul 19, 2026

Copy link
Copy Markdown

😎 Merged manually by @richardsolomou - details.

@github-actions

github-actions Bot commented Jul 19, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 0fcca4e.

Authenticate the gateway catalog so restricted models remain gated, and keep the catalog available when native model discovery fails.

Generated-By: PostHog Code
Task-Id: dfa9be76-95bf-4166-8adc-529483e3d525
@richardsolomou
richardsolomou requested a review from a team July 19, 2026 12:16
@posthog

posthog Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Visual changes approved by @richardsolomou — baseline updated in b20bf12.

View this run in PostHog

1 changed.

posthog Bot and others added 2 commits July 20, 2026 04:16
1 updated
Run: 03b80f6e-116e-4b88-98f8-7303071de456

Co-authored-by: richardsolomou <2622273+richardsolomou@users.noreply.github.com>
@richardsolomou
richardsolomou merged commit f41d71e into main Jul 20, 2026
30 of 31 checks passed
@richardsolomou
richardsolomou deleted the posthog-code/fix-restored-codex-model-list branch July 20, 2026 12:24
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.

2 participants