Skip to content

Revert "fix: remove auto-proceed fake user message injection (#255)" - #261

Closed
serrrfirat wants to merge 1 commit into
mainfrom
revert/auto-proceed-removal
Closed

serrrfirat wants to merge 1 commit into
mainfrom
revert/auto-proceed-removal

Conversation

@serrrfirat

Copy link
Copy Markdown
Collaborator

Summary

  • Reverts commit 8a4f3b6 which broke the main agent loop
  • LLM responses were accumulating/appending in the web gateway, producing garbled output
  • Restores resume_after_tool parameter and auto-proceed nudge logic in dispatcher.rs and thread_ops.rs

The fix will be re-attempted on a separate branch with proper manual testing before re-merging.

Test plan

  • Build and run after merge, verify web gateway chat works normally
  • Verify onboarding flow completes without output accumulation

🤖 Generated with Claude Code

@github-actions github-actions Bot added scope: agent Agent core (agent loop, router, scheduler) size: S 10-49 changed lines risk: medium Business logic, config, or moderate-risk modules labels Feb 20, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @serrrfirat, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request reverts a prior commit that introduced a critical bug, causing the main agent loop to break and leading to garbled, accumulating LLM output in the web gateway. The revert reintroduces necessary logic for managing tool execution and agentic flow, specifically restoring the resume_after_tool parameter and the mechanism for prompting the LLM to use tools when appropriate, ensuring correct agent behavior and response handling.

Highlights

  • Revert of Breaking Change: Reverted commit 8a4f3b6, which had introduced a critical bug breaking the main agent loop.
  • LLM Output Fix: Addressed the issue of LLM responses accumulating and producing garbled output in the web gateway.
  • Agentic Loop Logic Restoration: Restored the resume_after_tool parameter and the auto-proceed nudge logic within the agent's dispatcher and thread operations for correct tool execution flow.
Changelog
  • src/agent/dispatcher.rs
    • Added resume_after_tool boolean parameter to the run_agentic_loop function signature.
    • Initialized a new tools_executed mutable variable with the value of resume_after_tool.
    • Introduced conditional logic within the RespondResult::Text branch to re-prompt the LLM for tool use if no tools have been executed and the iteration count is low.
    • Set tools_executed to true when RespondResult::ToolCalls is processed.
  • src/agent/thread_ops.rs
    • Modified the initial call to run_agentic_loop to pass false for the resume_after_tool argument.
    • Modified the call to run_agentic_loop within the tool approval flow to pass true for the resume_after_tool argument.
Activity
  • The author identified a critical bug introduced by a previous commit (8a4f3b6) that broke the main agent loop and caused garbled LLM output.
  • The pull request was created to revert the problematic commit and restore correct agent behavior.
  • A plan for re-attempting the original fix on a separate branch with manual testing has been outlined.
  • A test plan is provided to verify the web gateway chat functionality and onboarding flow after the merge.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@github-actions github-actions Bot added the contributor: experienced 6-19 merged PRs label Feb 20, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request reverts a previous commit that introduced issues with the agent loop and LLM responses. The changes reintroduce the resume_after_tool parameter and auto-proceed logic, aiming to restore correct functionality. The code changes appear to correctly revert the problematic commit and reinstate the necessary logic for tool execution and LLM interaction. The changes are well-documented with comments explaining the purpose of the resume_after_tool parameter and the auto-proceed logic.

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

Labels

contributor: experienced 6-19 merged PRs risk: medium Business logic, config, or moderate-risk modules scope: agent Agent core (agent loop, router, scheduler) size: S 10-49 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant