agent.prompt behaves differently depending on model/auth path (really confusing) #9387

Open
opened 2026-02-16 18:12:20 -05:00 by yindo · 0 comments
Owner

Originally created by @dhruvkej9 on GitHub (Feb 15, 2026).

Originally assigned to: @thdxr on GitHub.

Description

Hey team — I think there is a real inconsistency here.

When I set agent.build.prompt, behavior changes depending on path:

  • Codex + OAuth: my prompt is layered, and Codex base instructions still apply.
  • Non-Codex providers: my prompt replaces the provider fallback prompt.

So same key (agent.prompt) acts additive in one path and replacement in another.

From user side this is super confusing. I can't reason about prompt behavior consistently across models.

Expected: one clear semantic model.

  • Either always additive
  • Or always replacement
  • Or explicit separate keys for each mode

Current split by provider/auth path feels accidental and easy to misconfigure.

Plugins

opencode-antigravity-auth@latest, @mohak34/opencode-notifier@latest

OpenCode version

1.2.4

Steps to reproduce

  1. Configure agent.build.prompt in opencode.json
  2. Run with openai/gpt-5.3-codex using OAuth
  3. Observe Codex instructions still present while custom prompt is also applied
  4. Switch to a non-Codex provider/model path
  5. Observe provider fallback prompt behavior differs (custom prompt path replaces fallback)

Code paths checked:

  • packages/opencode/src/session/llm.ts (around lines ~72 and ~115 in v1.2.4)
  • packages/opencode/src/session/system.ts (instructions() / Codex header)

Screenshot and/or share link

No share link right now. Verified using runtime behavior + source inspection.

Operating System

WSL2 (Ubuntu 24.04)

Terminal

WSL2 + Windows Terminal

Originally created by @dhruvkej9 on GitHub (Feb 15, 2026). Originally assigned to: @thdxr on GitHub. ### Description Hey team — I think there is a real inconsistency here. When I set `agent.build.prompt`, behavior changes depending on path: - Codex + OAuth: my prompt is layered, and Codex base instructions still apply. - Non-Codex providers: my prompt replaces the provider fallback prompt. So same key (`agent.prompt`) acts additive in one path and replacement in another. From user side this is super confusing. I can't reason about prompt behavior consistently across models. Expected: one clear semantic model. - Either always additive - Or always replacement - Or explicit separate keys for each mode Current split by provider/auth path feels accidental and easy to misconfigure. ### Plugins opencode-antigravity-auth@latest, @mohak34/opencode-notifier@latest ### OpenCode version 1.2.4 ### Steps to reproduce 1. Configure `agent.build.prompt` in `opencode.json` 2. Run with `openai/gpt-5.3-codex` using OAuth 3. Observe Codex instructions still present while custom prompt is also applied 4. Switch to a non-Codex provider/model path 5. Observe provider fallback prompt behavior differs (custom prompt path replaces fallback) Code paths checked: - `packages/opencode/src/session/llm.ts` (around lines ~72 and ~115 in v1.2.4) - `packages/opencode/src/session/system.ts` (`instructions()` / Codex header) ### Screenshot and/or share link No share link right now. Verified using runtime behavior + source inspection. ### Operating System WSL2 (Ubuntu 24.04) ### Terminal WSL2 + Windows Terminal
yindo added the bug label 2026-02-16 18:12:20 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9387