Skip to content

fix(server): preserve providerOptions across runtime mode changes and…

ec7664e
Select commit
Loading
Failed to load commit list.
Merged

Fix codex binary path setting having no effect #493

fix(server): preserve providerOptions across runtime mode changes and…
ec7664e
Select commit
Loading
Failed to load commit list.
MacroscopeApp / Macroscope - Correctness Check succeeded Mar 8, 2026 in 4m 23s

No issues identified (15 code objects reviewed).

• Merge Base: c97c6b7
• Head: ec7664e

Details

File Path Comments Posted
apps/server/scripts/cli.ts 0
apps/server/src/orchestration/decider.ts 0
packages/contracts/src/provider.ts 0
packages/contracts/src/orchestration.ts 0
apps/web/src/components/ChatView.tsx 0
apps/server/src/provider/Layers/ProviderService.ts 0
apps/server/src/orchestration/Layers/ProviderCommandReactor.ts 0

Filtered Issues Details

apps/server/src/orchestration/Layers/ProviderCommandReactor.ts
  • line 282: In ensureSessionForThread, the logic for reusing an existing session explicitly ignores options.providerOptions. If a user updates their provider configuration (e.g., changing an invalid API key) and retries an action, the system will reuse the existing failed/configured session instead of restarting it with the new options. This happens because the condition !runtimeModeChanged && !providerChanged && !shouldRestartForModelChange (lines 282) returns the existing session ID early, bypassing the startProviderSession call that would apply the new providerOptions. This effectively locks the thread into a broken configuration until the session is manually stopped or expires. [ Out of scope ]
apps/server/src/provider/Layers/ProviderService.ts
  • line 233: In recoverSessionForThread, the persistedProviderOptions are retrieved and used to resume the session, but they are not passed to upsertSessionBinding when persisting the resumed state. [ Cross-file consolidated ]