Skip to content

fix: normalize Remote Control session providers at creation - #1789

Open
Rat0323 wants to merge 6 commits into
BigPizzaV3:mainfrom
Rat0323:agent/remote-control-session-normalization
Open

fix: normalize Remote Control session providers at creation#1789
Rat0323 wants to merge 6 commits into
BigPizzaV3:mainfrom
Rat0323:agent/remote-control-session-normalization

Conversation

@Rat0323

@Rat0323 Rat0323 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Root cause

Phone-created threads could start with modelProvider = openai even though the official-mix profile used a custom provider. Rollout/SQLite state and local_thread_catalog then disagreed with the active provider, so the session remained on disk but disappeared from the active list after restart.

Implementation

Creation-time normalization

For relayMode = official with officialMixApiKey = true, the injected app-server request layer intercepts thread/start and host aliases, replaces a missing or openai modelProvider with the active provider, preserves other explicit providers, and forwards the request before persistence.

The override is independent of model-whitelist and service-tier UI switches, and app-server client discovery retries until its runtime module is available. Pure official, Mixed API, Pure API, and Aggregate profiles do not automatically enable this Remote Control-specific path.

Startup recovery

Launcher-time Provider Sync is automatically invoked only for official-mix profiles. Other modes keep the existing opt-in provider_sync_enabled behavior. The sync repairs older rollout/SQLite mismatches and missing catalog rows with its existing backup behavior.

Validation

  • Current experimental app-server schema confirms ThreadStartParams.modelProvider.
  • node --check assets/inject/renderer-inject.js
  • cargo fmt --all -- --check
  • git diff --check
  • cargo test -p codex-plus-core --test cdp_bridge -- --test-threads=1 — 94 passed
  • Provider override coverage includes missing/openai, explicit other provider, disabled service-tier controls, pure official, and direct app-server client calls.
  • Launcher predicates verify official-mix runs automatically while pure official, Mixed API, Pure API, Aggregate, and disabled relay profiles are skipped — 4 passed.
  • Previous recovery flow verified with session 019fd56e-2eca-7f10-9c06-47e1dbf860f9.

Rat0323 added 4 commits August 6, 2026 13:40
Run Provider Sync during launcher startup for every non-pure-official relay profile even when the Provider Sync toggle is off, so mobile-created openai sessions are normalized to the active provider and recorded in local_thread_catalog.
@Rat0323 Rat0323 changed the title fix: normalize remote control sessions on launcher start fix: normalize Remote Control session providers at creation Aug 6, 2026
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