Skip to content

fix(codex): avoid duplicate client instructions#27

Merged
rexdotsh merged 2 commits into
mainfrom
fix/codex-instruction-hoisting
Jul 21, 2026
Merged

fix(codex): avoid duplicate client instructions#27
rexdotsh merged 2 commits into
mainfrom
fix/codex-instruction-hoisting

Conversation

@rexdotsh

Copy link
Copy Markdown
Owner

Summary

  • promote a leading system/developer input into top-level Codex instructions when the client omits that field
  • remove the promoted input item to match OpenCode native OAuth request shape
  • retain explicit client instructions and use the vendored fallback only when no instruction context exists

Context

OpenCode sends its current GPT prompt as a developer input when using Kleis. Kleis previously also injected its vendored Codex fallback, causing gpt-5.5 and gpt-5.6-sol to receive two overlapping system prompts.

Verification

  • bun test (86 pass)
  • bun lint
  • bun typecheck
  • git diff --check

@rexdotsh
rexdotsh merged commit 9b0e3bc into main Jul 21, 2026
2 checks passed
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