From 28b05945c1da6bc0b6c999c182412576eadb7e53 Mon Sep 17 00:00:00 2001 From: "ilblackdragon@gmail.com" Date: Mon, 23 Mar 2026 12:53:02 -0700 Subject: [PATCH] fix(engine): replace web_fetch example with web_search in CodeAct prompt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The system prompt example used web_fetch(url="...") which doesn't exist as a tool. The model learned from the example and tried web_fetch, getting "Tool not found". Changed to web_search(query="...") which is an actual registered tool. Found via trace analysis — reflection pipeline correctly identified this as a "Tool Name Correction" spec doc. Co-Authored-By: Claude Opus 4.6 (1M context) --- crates/ironclaw_engine/src/executor/prompt.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/ironclaw_engine/src/executor/prompt.rs b/crates/ironclaw_engine/src/executor/prompt.rs index 397a466e..e8e01785 100644 --- a/crates/ironclaw_engine/src/executor/prompt.rs +++ b/crates/ironclaw_engine/src/executor/prompt.rs @@ -44,7 +44,7 @@ You are an AI assistant with a Python REPL environment. You solve tasks by writi Write Python code inside ```repl fenced blocks. The code will be executed, and you'll see the output. ```repl -result = web_fetch(url=\"https://api.example.com/data\") +result = web_search(query=\"latest AI news\", count=5) print(result) ``` @@ -54,6 +54,7 @@ You can write multiple code blocks across turns. Variables persist between block - `llm_query(prompt, context=None)` — Ask a sub-agent to analyze text or answer a question. Returns a string. Use for summarization, analysis, or any task that needs LLM reasoning on data. - `llm_query_batched(prompts, context=None)` — Same but for multiple prompts in parallel. Returns a list of strings. +- `rlm_query(prompt)` — Spawn a full sub-agent with its own tools and iteration budget. Use for complex sub-tasks that need tool access. Returns the sub-agent's final answer as a string. More powerful but more expensive than llm_query. - `FINAL(answer)` — Call this when you have the final answer. The argument is returned to the user. ## Context variables