Commit Graph

124 Commits

Author SHA1 Message Date
Re-bin
13d768cd93 Merge branch 'main' into pr-939 2026-02-21 17:06:05 +00:00
Xubin Ren
6a9152f0c4 Merge PR #947 to Fix 'Missing reasoning_content field' error for deepseek provider.
fix(context): Fix 'Missing `reasoning_content` field' error for deepseek provider.
2026-02-22 00:47:58 +08:00
nanobot-bot
01c835aac2 fix(context): Fix 'Missing reasoning_content field' error for deepseek provider. 2026-02-21 23:11:30 +08:00
vincentchen
b3acd19c7b Remove redundant tools description (because tools information is passed in with each self.provider.chat() call) 2026-02-21 20:28:42 +08:00
Re-bin
0b30f514b4 style(loop): compact empty outbound message construction 2026-02-21 08:27:49 +00:00
Re-bin
012a5e78e5 Merge branch 'main' into pr-926 2026-02-21 08:21:17 +00:00
Re-bin
ab026c5131 refactor: extract memory consolidation to MemoryStore, slim down AgentLoop 2026-02-21 08:14:46 +00:00
Re-bin
668dd6e2f5 Merge pull request #866: refactor(memory): use tool call instead of JSON text for memory consolidation 2026-02-21 08:02:03 +00:00
Re-bin
8c15454379 Merge branch 'main' into pr-866 2026-02-21 07:46:25 +00:00
Re-bin
aeb07d3450 refactor(loop): remove interim text retry, use system prompt constraint instead 2026-02-21 07:32:58 +00:00
Re-bin
8bb849470b Merge branch 'main' into pr-887 2026-02-21 07:12:58 +00:00
Alexander Minges
c4bee640b8 fix(agent): skip empty fallback outbound for non-cli channels 2026-02-21 07:51:28 +01:00
Re-bin
4f5cb7d1e4 style(filesystem): simplify best-match loop 2026-02-21 06:39:04 +00:00
Re-bin
e0edb904bd style(filesystem): move difflib import to top level 2026-02-21 06:35:10 +00:00
themavik
33396a522a fix(tools): provide detailed error messages in edit_file when old_text not found
Uses difflib to find the best match and shows a helpful diff,
making it easier to debug edit_file failures.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-20 23:52:40 -05:00
Re-bin
9a31571b6d fix: don't append interim assistant message before retry to avoid prefill errors 2026-02-20 16:51:37 +00:00
Re-bin
7279ff0167 refactor: route CLI interactive mode through message bus for subagent support 2026-02-20 16:45:21 +00:00
Re-bin
80b5e6cea0 Merge branch 'main' into pr-892 2026-02-20 16:06:17 +00:00
Re-bin
132807a3fb refactor: simplify message tool turn tracking to a single boolean flag 2026-02-20 15:55:30 +00:00
Nikolas de Hor
37222f9c0a fix: add connecting guard to prevent concurrent MCP connection attempts
Addresses Codex review: concurrent callers could both pass the
_mcp_connected guard and race through _connect_mcp(). Added
_mcp_connecting flag set immediately to serialize attempts.
2026-02-20 09:38:22 -03:00
Nikolas de Hor
45f33853cf fix: only apply interim fallback when no tools were used
Addresses Codex review: if the model sent interim text then used tools,
the interim text should not be used as fallback for the final response.
2026-02-20 09:37:42 -03:00
Kim
8cc54b188d style(logging): use loguru parameterized formatting in suppression log 2026-02-20 20:25:46 +08:00
Nikolas de Hor
44f44b305a fix: move MCP connected flag after successful connection to allow retry
The flag was set before the connection attempt, so if any MCP server
was temporarily unavailable, the flag stayed True and MCP tools were
permanently lost for the session.

Closes #889
2026-02-20 09:24:48 -03:00
Nikolas de Hor
4eb07c44b9 fix: preserve interim content as fallback when retry produces empty response
Fixes regression from #825 where models that respond with final text
directly (no tools) had their answer discarded by the retry mechanism.

Closes #878
2026-02-20 09:21:27 -03:00
Kim
ddae3e9d5f fix(agent): avoid duplicate final send when message tool already replied 2026-02-20 20:16:45 +08:00
Re-bin
0c2fea6d33 Merge branch 'main' into pr-795 2026-02-20 11:25:51 +00:00
Re-bin
8db91f59e2 style: remove trailing space 2026-02-20 11:18:57 +00:00
Re-bin
b73e847e89 Merge branch 'main' into pr-833 2026-02-20 11:16:49 +00:00
Re-bin
44eb1bdca2 Merge branch 'main' into pr-815 2026-02-20 08:57:02 +00:00
Re-bin
f5fe74f578 style: move httpx import to top-level and fix README example for MCP headers 2026-02-20 08:49:49 +00:00
Re-bin
bbd76e8f5b Merge branch 'main' into pr-807 2026-02-20 08:47:13 +00:00
Re-bin
686471bd8d Merge branch 'main' into pr-823 2026-02-20 08:33:45 +00:00
Re-bin
2383dcb3a8 style: use loguru native format and trim comments in interim retry 2026-02-20 08:31:48 +00:00
Re-bin
0660d614f6 Merge branch 'main' into pr-825 2026-02-20 08:24:26 +00:00
Re-bin
a9bffdc06f Merge branch 'main' into pr-644 2026-02-20 08:08:55 +00:00
Re-bin
e17342ddfc fix: pass workspace to file tools in subagent 2026-02-20 08:03:24 +00:00
Re-bin
55ac4b729e Merge branch 'main' into pr-653 2026-02-20 08:01:08 +00:00
Re-bin
73fdd0dd45 fix: complete ensure_ascii=False and UTF-8 encoding migration 2026-02-20 07:59:32 +00:00
Re-bin
37252a4226 fix: complete loguru native formatting migration across all files 2026-02-20 07:55:34 +00:00
Rudolfs Tilgass
afca0278ad fix(memory): Enforce memory consolidation schema with a tool call 2026-02-19 22:14:51 +01:00
Nikolas de Hor
53b83a38e2 fix: use loguru native formatting to prevent KeyError on messages containing curly braces
Closes #857
2026-02-19 17:19:36 -03:00
Re-bin
1c51fbeeee Merge branch 'main' into pr-820 2026-02-19 17:44:30 +00:00
Nikolas de Hor
c86dbc9f45 fix: wait for killed process after shell timeout to prevent fd leaks
When a shell command times out, process.kill() is called but the
process object was never awaited after that. This leaves subprocess
pipes undrained and file descriptors open. If many commands time out,
fd leaks accumulate.

Add a bounded wait (5s) after kill to let the process fully terminate
and release its resources.
2026-02-19 10:27:11 -03:00
Nikolas de Hor
1b49bf9602 fix: avoid duplicate messages on retry and reset final_content
Address review feedback:
- Remove on_progress call for interim text to prevent duplicate
  messages when the model simply answers a direct question
- Reset final_content to None before continue to avoid stale
  interim text leaking as the final response on empty retry

Closes #705
2026-02-19 10:26:49 -03:00
Darye
523b2982f4 fix: fixed not logging tool uses if a think fragment had them attached.
if a think fragment had a tool attached, the tool use would not log. now it does
2026-02-19 05:22:00 +01:00
chtangwin
a2379a08ac Fix: Ensure UTF-8 encoding and ensure_ascii=False for remaining file/JSON operations 2026-02-18 18:37:17 -08:00
chtangwin
c7b5dd9350 Fix: Ensure UTF-8 encoding for all file operations 2026-02-18 18:28:54 -08:00
Nikolas de Hor
464352c664 fix: allow one retry for models that send interim text before tool calls
Some LLM providers (MiniMax, Gemini Flash, GPT-4.1, etc.) send an
initial text-only response like "Let me investigate..." before actually
making tool calls. The agent loop previously broke immediately on any
text response without tool calls, preventing these models from ever
using tools.

Now, when the model responds with text but hasn't used any tools yet,
the loop forwards the text as progress to the user and gives the model
one additional iteration to make tool calls. This is limited to a
single retry to prevent infinite loops.

Closes #705
2026-02-18 21:31:12 -03:00
Nikolas de Hor
107a380e61 fix: prevent duplicate memory consolidation tasks per session
Add a `_consolidating` set to track which sessions have an active
consolidation task. Skip creating a new task if one is already in
progress for the same session key, and clean up the flag when done.

This prevents the excessive API calls reported when messages exceed
the memory_window threshold — previously every single message after
the threshold triggered a new background consolidation.

Closes #751
2026-02-18 21:31:09 -03:00
ruby childs
536ed60a05 Fix safety guard false positive on 'format' in URLs
The deny pattern `\b(format|mkfs|diskpart)\b` incorrectly blocked
commands containing "format" inside URLs (e.g. `curl https://wttr.in?format=3`)
because `\b` fires at the boundary between `?` (non-word) and `f` (word).

Split into two patterns:
- `(?:^|[;&|]\s*)format\b` — only matches `format` as a standalone
  command (start of line or after shell operators)
- `\b(mkfs|diskpart)\b` — kept as-is (unique enough to not false-positive)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 16:39:06 -05:00