From d7edeb359d8c63943646e449bf23f0bf2087692d Mon Sep 17 00:00:00 2001 From: xgopilot Date: Wed, 15 Apr 2026 16:15:03 +0000 Subject: [PATCH] =?UTF-8?q?fix(runtime):=20=E6=B8=85=E7=90=86=E5=86=B2?= =?UTF-8?q?=E7=AA=81=E6=A0=87=E8=AE=B0=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: phantom5099 <245659304+phantom5099@users.noreply.github.com> --- internal/runtime/run.go | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/internal/runtime/run.go b/internal/runtime/run.go index ea3930c5..46004307 100644 --- a/internal/runtime/run.go +++ b/internal/runtime/run.go @@ -253,9 +253,6 @@ func (s *Service) prepareTurnSnapshot(ctx context.Context, state *runState) (tur state.mu.Unlock() limit := resolveNoProgressStreakLimit(cfg.Runtime) -<<<<<<< codex/issue-294-auto-compact-threshold - systemPrompt := withSelfHealingReminder(builtContext.SystemPrompt, streak, limit) -======= repeatLimit := resolveRepeatCycleStreakLimit(cfg.Runtime) systemPrompt := builtContext.SystemPrompt @@ -266,15 +263,9 @@ func (s *Service) prepareTurnSnapshot(ctx context.Context, state *runState) (tur } else { systemPrompt = trimmed + "\n\n" + selfHealingRepeatReminder } - } else if streak == limit-1 { - trimmed := strings.TrimSpace(systemPrompt) - if trimmed == "" { - systemPrompt = selfHealingReminder - } else { - systemPrompt = trimmed + "\n\n" + selfHealingReminder - } + } else { + systemPrompt = withSelfHealingReminder(systemPrompt, streak, limit) } ->>>>>>> main model := strings.TrimSpace(cfg.CurrentModel) return turnSnapshot{