From 32f1f3e863a4844ad29285425749405d91f34662 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Tue, 2 Dec 2025 14:04:41 -0500 Subject: Remove duplicate prompt content The task was being added to the prompt twice, once in the base prompt and once in the user prompt. --- Omni/Agent/Worker.hs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'Omni/Agent') diff --git a/Omni/Agent/Worker.hs b/Omni/Agent/Worker.hs index ed1e3be..0e4071d 100644 --- a/Omni/Agent/Worker.hs +++ b/Omni/Agent/Worker.hs @@ -252,7 +252,7 @@ runWithEngine worker repo task = do -- Build the full prompt let ns = fromMaybe "." (TaskCore.taskNamespace task) - let basePrompt = buildBasePrompt task ns repo + let basePrompt = buildBasePrompt ns repo -- Add progress context if present let progressPrompt = buildProgressPrompt progressContent @@ -371,12 +371,11 @@ runWithEngine worker repo task = do pure (EngineSuccess output totalCost) -- | Build the base prompt for the agent -buildBasePrompt :: TaskCore.Task -> Text -> FilePath -> Text -buildBasePrompt task ns repo = +buildBasePrompt :: Text -> FilePath -> Text +buildBasePrompt ns repo = "You are `jr`, an autonomous Senior Software Engineer. You are rigorous, efficient, and safety-conscious.\n" - <> "Your Goal: Complete the following task with **zero regressions**.\n\n" - <> formatTask task - <> "\n\n# The Workflow\n" + <> "Your Goal: Complete the assigned task with **zero regressions**.\n\n" + <> "# The Workflow\n" <> "Follow this 4-phase loop. Do not skip phases.\n\n" <> "## Phase 1: Exploration (MANDATORY)\n" <> "- NEVER edit immediately. Explore first.\n" @@ -608,7 +607,7 @@ buildFullPrompt :: TaskCore.Task -> IO Text buildFullPrompt task = do repo <- Directory.getCurrentDirectory let ns = fromMaybe "." (TaskCore.taskNamespace task) - let basePrompt = buildBasePrompt task ns repo + let basePrompt = buildBasePrompt ns repo maybeRetry <- TaskCore.getRetryContext (TaskCore.taskId task) progressContent <- TaskCore.getProgressSummary (TaskCore.taskId task) -- cgit v1.2.3