Skip to content

Fix assistant tool-loop resilience#44

Merged
linuscooper merged 8 commits into
mainfrom
fix/assistant-tool-loop-43
Jul 3, 2026
Merged

Fix assistant tool-loop resilience#44
linuscooper merged 8 commits into
mainfrom
fix/assistant-tool-loop-43

Conversation

@SebastianBoehler

@SebastianBoehler SebastianBoehler commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

First scoped batch for #43. This PR focuses only on assistant tool-loop reliability and leaves mail/session reuse, model catalog/runtime settings, prompt compaction, and rendering performance for follow-up PRs.

Changes:

  • lets cloud assistant calls run bounded multi-round tool loops instead of stopping after one tool round
  • returns failed cloud tool calls to the model as tool results instead of aborting the whole turn
  • returns failed local tool calls as feedback to the local model instead of aborting the whole turn
  • passes fresh memory reads into local tool execution so local and cloud tools use consistent memory freshness
  • adds focused tests for multi-round cloud tools, failed cloud tools, and local fresh-memory reads

Scope intentionally left out

  • mail IMAP session reuse and partial message fetching
  • HTTP client lifecycle reuse/close work
  • prompt-size/system-prompt deduplication
  • LiteRT timeout/sampling/model download integrity work
  • chat rebuild/trace-compaction performance work

Verification

  • git diff --check

Not run locally:

  • Flutter/Dart formatter, analyzer, and tests. This runtime does not have dart or flutter on PATH.

Commit 7a79853 renamed CloudAgentException to AgentException and updated
all imports, but the new file defining the class was left untracked, so
CI failed to resolve the 'agent_exception.dart' URI.
@linuscooper
linuscooper merged commit ed800f7 into main Jul 3, 2026
7 checks passed
@linuscooper
linuscooper deleted the fix/assistant-tool-loop-43 branch July 3, 2026 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants