OpenAI oauth 5.2 codex model is not injecting system prompt for agent persona #7965

Closed
opened 2026-02-16 18:08:48 -05:00 by yindo · 1 comment
Owner

Originally created by @CarlosCommits on GitHub (Jan 29, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

When using OpenAI 5.2, the agent persona/system prompt (and maybe the entire config?) is not being passed through correctly.

Plugins

none

OpenCode version

1.1.42

Steps to reproduce

  1. Try using opencode with 5.2 codex OpenAI oauth model
  2. Ask any agent "what agent are you"
  3. will always respond with "I'm opencode, your coding assistant"
  4. Repeat same steps with any other LLM model and you will get the correct identity answer.
  5. When using 5.2 codex model, all agents function as default opencode default build agent it seems.

Screenshot and/or share link

I created a 'test' agent to demonstrate.

Here, 5.2 oauth model is used and does not inject agent persona:

Image

Here, 5.2 Zen API is used and it does pick up/inject agent persona:

Image

Here, GLM 4.7 Zen API is used and correctly injects agent config as well:

Image

Operating System

Ubuntu - WSL

Terminal

Wezterm

Originally created by @CarlosCommits on GitHub (Jan 29, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description When using OpenAI 5.2, the agent persona/system prompt (and maybe the entire config?) is not being passed through correctly. ### Plugins none ### OpenCode version 1.1.42 ### Steps to reproduce 1. Try using opencode with 5.2 codex OpenAI oauth model 2. Ask any agent "what agent are you" 3. will always respond with "I'm opencode, your coding assistant" 4. Repeat same steps with any other LLM model and you will get the correct identity answer. 5. When using 5.2 codex model, all agents function as default opencode default build agent it seems. ### Screenshot and/or share link I created a 'test' agent to demonstrate. Here, 5.2 oauth model is used and does not inject agent persona: <img width="1243" height="897" alt="Image" src="https://github.com/user-attachments/assets/3369567c-9f87-456b-94d6-8666a8907aee" /> Here, 5.2 Zen API is used and it does pick up/inject agent persona: <img width="1244" height="901" alt="Image" src="https://github.com/user-attachments/assets/4c8b6513-7fdc-4eee-bb36-413b179d9e7b" /> Here, GLM 4.7 Zen API is used and correctly injects agent config as well: <img width="1259" height="983" alt="Image" src="https://github.com/user-attachments/assets/b9056011-f538-40e9-9450-d8c595c3d867" /> ### Operating System Ubuntu - WSL ### Terminal Wezterm
yindo added the bugzen labels 2026-02-16 18:08:48 -05:00
yindo closed this issue 2026-02-16 18:08:48 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 29, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #11086: GPT 5.2 Codex - Compaction happens way too early and context limit is wrong

Both issues involve OpenAI's GPT 5.2 Codex model having configuration/behavior problems (agent persona injection in #11163 vs context limit miscalculation in #11086).

Feel free to ignore if this doesn't address your specific case.

@github-actions[bot] commented on GitHub (Jan 29, 2026): This issue might be a duplicate of existing issues. Please check: - #11086: GPT 5.2 Codex - Compaction happens way too early and context limit is wrong Both issues involve OpenAI's GPT 5.2 Codex model having configuration/behavior problems (agent persona injection in #11163 vs context limit miscalculation in #11086). Feel free to ignore if this doesn't address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7965