Skip to content

fix(app): stop showing instruction updates as the system prompt in the Context tab - #64991

Merged
rekram1-node merged 1 commit into
devfrom
context-system-prompt
Nov 20, 2026
Merged

rekram1-node merged 1 commit into
devfrom
context-system-prompt

Conversation

@rekram1-node

@rekram1-node rekram1-node commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Issue for this PR

No issue. Found in the session Context tab.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

The Context tab has a "System Prompt" section, but it never showed the system prompt. It showed the text of the last system message in the session. In the current message model those are mid-session instruction updates (session.instructions.updated): "The Code Mode tool catalog has changed", MCP instructions that changed, and so on. So the panel labeled a tool catalog diff as the system prompt.

before: last message with type "system" → shown as "System Prompt"
        (a mid-session update, not the prompt)
after:  section removed

The real system prompt isn't stored as a message and no client API returns it, so there's nothing correct to show here today. The label came from the old message model, where user messages carried a system field. It survived the move to the new one (#43017) with the lookup pointed at a different kind of message.

Removed the section, its now-unused Markdown import and the systemPrompt.title string in every locale. The updates themselves still show in the timeline and in Raw Messages.

If we want the actual prompt back in this tab, that needs a server endpoint that returns the rendered prompt. I left that for a separate change.

How did you verify your code works?

  • gui-plugins typecheck, bun test src/context (23 tests), lint:changed.
  • Not checked in the desktop app.

Screenshots / recordings

Before: the section showed "The Code Mode tool catalog has changed. New tools are available: ..." under "System Prompt". After: the section is gone; the stats and Raw Messages are unchanged.

Visual

<svg xmlns="http://www.w3.org/2000/svg" width="240" height="72" viewBox="0 0 240 72" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
  <style>.g{animation:go 3s ease-in-out infinite}@keyframes go{0%,40%{opacity:.6}60%,100%{opacity:0}}@media (prefers-reduced-motion:reduce){.g{animation:none;opacity:0}}</style>
  <rect x="40" y="6" width="160" height="60" rx="8" opacity=".25"/>
  <line x1="56" y1="18" x2="110" y2="18" opacity=".5"/><line x1="130" y1="18" x2="184" y2="18" opacity=".5"/>
  <rect class="g" x="54" y="28" width="132" height="22" rx="4"/>
  <line x1="56" y1="58" x2="150" y2="58" opacity=".5"/>
</svg>

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Added by the opencode bot (AI-generated).

Related: #55046

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks correct to me. On dev, every stored system message is a notice: an instruction update, a restart notice or the v1-migration tool notice. So this section could only ever show one of those, or nothing. Taking it out until a server endpoint can return the rendered prompt seems like the right call; patching the selector wouldn't fix it.

I checked this by reading the code. I couldn't render the Context tab because there's no browser in my sandbox. bun test src/context passes (23 tests) and tsc -b is clean for gui-plugins. A quick look in the desktop or web app, or a before/after screenshot, would still be good, since the description says it wasn't checked there.

Public API: unchanged. Only a UI section and its i18n key were removed.

#55046 reports this mislabeling. Its expected behaviour is to show the real prompt or say it isn't available, so I've marked it as related rather than fixed. If removing the section is the intended answer for now, you could close it from the description.

Related: #55046

@rekram1-node
rekram1-node merged commit b5e0abd into dev Nov 20, 2026
13 checks passed
@rekram1-node
rekram1-node deleted the context-system-prompt branch November 20, 2026 06:21
@amrkmn amrkmn mentioned this pull request Nov 23, 2026
1 task
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