Skip to content

fix(server): disable unsupported summaries for Codex Spark - #2647

Open
astartsky wants to merge 2 commits into
getpaseo:mainfrom
astartsky:fix/codex-spark-reasoning-summary
Open

fix(server): disable unsupported summaries for Codex Spark#2647
astartsky wants to merge 2 commits into
getpaseo:mainfrom
astartsky:fix/codex-spark-reasoning-summary

Conversation

@astartsky

@astartsky astartsky commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Linked issue

Closes #2646

Type of change

  • Bug fix
  • New feature (with prior issue + design alignment)
  • Refactor / code improvement
  • Docs

What does this PR do

Codex 0.144.4 applies the global reasoning-summary setting to Spark, but gpt-5.3-codex-spark rejects reasoning.summary with a 400 unsupported_parameter response.

This change scopes the compatibility override to the built-in Codex provider and Spark model:

  • thread/start and thread/resume receive model_reasoning_summary = "none".
  • Every Spark turn/start uses the protocol-supported summary: "none" override.
  • Switching away from Spark restores the configured Codex summary value for subsequent turns.
  • Custom Codex-derived providers and users with no configured summary are left unchanged.

The per-turn override matters for already-loaded threads: turn/start.config is not part of the Codex app-server protocol, while turn/start.summary is.

How did you verify it

Automated coverage in codex-app-server-agent.test.ts verifies:

  • a new Spark thread;
  • a resumed Spark thread;
  • Sol → Spark → Terra in one existing thread (concisenoneconcise);
  • a custom Codex-derived provider using the Spark model ID;
  • a non-Spark model with no configured summary.

Commands run on the final branch after rebasing onto origin/main:

  • npm run build:server
  • npx vitest run packages/server/src/server/agent/providers/codex-app-server-agent.test.ts --bail=1 — 119/119 passed
  • npm run typecheck
  • npm run lint — 0 warnings, 0 errors
  • npm run format:check
  • git diff --check origin/main...HEAD

Real provider verification:

  1. Ran the patched daemon with Codex CLI 0.144.4 and model_reasoning_summary = "concise".
  2. Created a real codex/gpt-5.3-codex-spark agent through Paseo with low thinking and auto-review mode.
  3. Sent Reply with exactly SPARK_OK. Do not use tools.
  4. The agent completed with SPARK_OK; the daemon log contained no unsupported_parameter or reasoning.summary failure for that agent.

Checklist

  • One focused change. Unrelated cleanups split out.
  • npm run typecheck passes
  • npm run lint passes
  • npm run format ran
  • UI evidence is not applicable (server-only fix)
  • Tests added or updated where it made sense

Comment thread packages/server/src/server/agent/providers/codex-app-server-agent.ts Outdated
@greptile-apps

greptile-apps Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR prevents unsupported reasoning summaries from reaching the built-in Codex Spark model.

  • Applies none to Spark thread start, resume, and per-turn requests.
  • Restores the configured summary when switching to another built-in Codex model.
  • Excludes custom Codex-derived providers from the compatibility override.
  • Adds regression coverage for new, resumed, switched-model, custom-provider, and unconfigured-summary sessions.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; the previous custom-provider issue is fixed by gating both the thread-level compatibility override and turn-level summary handling on the absence of a custom provider.

Important Files Changed

Filename Overview
packages/server/src/server/agent/providers/codex-app-server-agent.ts Adds a built-in-provider-only Spark compatibility override and resolves configured reasoning summaries for each turn.
packages/server/src/server/agent/providers/codex-app-server-agent.test.ts Covers Spark thread lifecycle behavior, model switching, absent defaults, and preservation of custom-provider settings.

Reviews (2): Last reviewed commit: "fix(server): preserve custom Codex summa..." | Re-trigger Greptile

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.

Codex Spark turns fail when reasoning summaries are enabled

1 participant