Skip to content

Improve native tool outcomes and prevent no-progress loops - #391

Merged
SudoJacky merged 4 commits into
masterfrom
fix/browser-click-no-change-loop
Aug 7, 2026
Merged

Improve native tool outcomes and prevent no-progress loops#391
SudoJacky merged 4 commits into
masterfrom
fix/browser-click-no-change-loop

Conversation

@SudoJacky

Copy link
Copy Markdown
Owner

Summary

  • expose structured domain outcomes for web, shell, and MCP tool results
  • centralize model guidance and UI summaries from the structured result envelope
  • detect browser actions that execute without changing page state
  • prevent equivalent external tool calls from repeating after a no-progress result until relevant state changes
  • preserve explicit same-call continuations such as shell polling

Why

Browser actions that produced no observable change could previously look successful to the agent. With limited result semantics, the model could repeat the same click indefinitely. Other native tools also returned inconsistent failure and continuation information.

Impact

The model now receives consistent execution status and domain-effect guidance. Repeated calls against unchanged state are returned as a structured repeated_no_progress result and the agent is asked to replan instead of redispatching the tool.

Validation

  • cargo test tool_loop_guard --jobs 4
  • cargo test agent::runtime::tests::tools --jobs 4
  • cargo test agent::runtime::tool_projection::tests --jobs 4
  • cargo test agent::runtime::tool_result::tests --jobs 4
  • cargo fmt --all -- --check
  • git diff --check

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 55474f6a5c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +869 to +871
McpRuntimeErrorKind::InvalidArguments
| McpRuntimeErrorKind::ServerStarting
| McpRuntimeErrorKind::Timeout

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Allow transient MCP startup calls to retry

When parallel MCP calls target a fresh server, the first call starts the client while the second receives ServerStarting; by the time the batch returns, that server may already be ready. Mapping this explicitly retryable condition to Replan with no nextAction causes the loop guard to record the call as no-progress and permanently block an identical retry during the turn, so one of the advertised parallel calls cannot be recovered. Treat ServerStarting as retryable with updated state or otherwise exempt it from the no-progress guard.

Useful? React with 👍 / 👎.

@SudoJacky
SudoJacky merged commit 4a45f85 into master Aug 7, 2026
1 check passed
@SudoJacky
SudoJacky deleted the fix/browser-click-no-change-loop branch August 7, 2026 13:00
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.

1 participant