Skip to content

Stop agent follow-up actions after tool failures#424

Open
tsubasakong wants to merge 13 commits intoRightNow-AI:mainfrom
tsubasakong:fix/414-stop-after-tool-errors
Open

Stop agent follow-up actions after tool failures#424
tsubasakong wants to merge 13 commits intoRightNow-AI:mainfrom
tsubasakong:fix/414-stop-after-tool-errors

Conversation

@tsubasakong
Copy link

@tsubasakong tsubasakong commented Mar 8, 2026

Summary

Fixes #414

  • inject explicit no-fabrication guidance into the next LLM turn whenever any tool call fails
  • apply the guidance in both standard and streaming agent loops so failed web_search results are not treated as evidence for downstream actions
  • add a regression test that asserts the guidance is included after a failed tool call

Changes

  • inject explicit no-fabrication guidance into the next LLM turn whenever any tool call fails
  • apply the guidance in both standard and streaming agent loops so failed web_search results are not treated as evidence for downstream actions
  • add a regression test that asserts the guidance is included after a failed tool call

Testing

  • cargo clippy --workspace --all-targets -- -D warnings passes
  • cargo test --workspace passes
  • Live integration tested (if applicable)

Testing notes:

  • git diff --check
  • host Rust toolchain unavailable here (cargo/rustc not installed), so I could not run cargo test

Fixes #414.

Security

  • No new unsafe code
  • No secrets or API keys in diff
  • User input validated at boundaries

@jaberjaber23 jaberjaber23 added the under-review PR is under review label Mar 11, 2026
@jaberjaber23
Copy link
Member

thanks for this! we're reviewing and may implement this differently to fit our architecture. will keep you posted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

under-review PR is under review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Agent continues generating fabricated response and calling tools after web_search failure

2 participants