Skip to content

<system-reminder> wrapping fires on every tool-call iteration in follow-up messages, derailing model behavior #29659

@Flowing8175

Description

@Flowing8175

Description

In prompt.ts (~line 1415), user message text parts in follow-up messages get wrapped in tags with "Please address this message and continue with your tasks" whenever step > 1 && lastFinished. This fires on every tool-call round.
Models interpret "Please address this message and continue with your tasks" as a system-level instruction to keep going, and start outputting "The system is asking me to continue" and wastes tokens. The in-place mutation of p.text also causes the wrapping to nest on subsequent iterations, compounding the issue.

Plugins

code-yeongyu/oh-my-openagent, different-ai/opencode-browser

OpenCode version

1.15.11

Steps to reproduce

  1. Start a session, send any message, let it complete (sets lastFinished)
  2. Send a follow-up message that requires multiple tool calls (e.g. "fix all lint errors" or "read these files then summarize")
  3. Every tool calls prepends <system-reminder> ...
  4. The model starts repeating "the system is asking me to continue"

First message in a fresh session never triggers this since lastFinished is null so the wrapping block is skipped.

Screenshot and/or share link

Operating System

Ubuntu 26.04

Terminal

Konsole (bundled with Kubuntu)

(sorry for initial mispaste with ai-generated issue draft)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions