We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 61d7ac9 commit 6289cc2Copy full SHA for 6289cc2
1 file changed
crates/code_assistant/src/agent/runner.rs
@@ -1412,6 +1412,13 @@ impl Agent {
1412
return messages;
1413
}
1414
1415
+ // Skip the reminder when the `name_session` tool isn't available in the
1416
+ // current tool scope (e.g. for sub-agents). Otherwise we'd nag the agent
1417
+ // to call a tool it cannot use.
1418
+ if !ToolRegistry::global().is_tool_in_scope("name_session", self.tool_scope) {
1419
+ return messages;
1420
+ }
1421
+
1422
// Find the last actual user message (not tool results) and add system reminder
1423
// Iterate backwards through messages to find the last user message with actual content
1424
for msg in messages.iter_mut().rev() {
0 commit comments