Skip to content

fix: preserve bootstrap paths and expose failed mutations#16131

Merged
gumadeiras merged 4 commits intoopenclaw:mainfrom
Swader:codex/fix-bootstrap-path-and-tool-truthfulness
Feb 14, 2026
Merged

fix: preserve bootstrap paths and expose failed mutations#16131
gumadeiras merged 4 commits intoopenclaw:mainfrom
Swader:codex/fix-bootstrap-path-and-tool-truthfulness

Conversation

@Swader
Copy link
Contributor

@Swader Swader commented Feb 14, 2026

This PR is a safety and accuracy fix for agent behavior.

  1. It fixes file targeting:
  • Bootstrap context now keeps the real file path (not just filename), so the agent points tools at the correct file.
  1. It fixes “false success” messaging:
  • If a mutating tool (write, edit, message, exec, etc.) fails, the failure is now surfaced to the user even if the model also produced normal text.
  • This prevents “I changed it” claims when the change actually failed.
  1. It fixes stale error state:
  • After a successful retry, prior tool error state is cleared so old failures don’t leak into later replies.
  1. It adds regression tests

Net effect: fewer hallucinated “done” confirmations

Greptile Overview

Greptile Summary

Fixes three agent behavior issues: preserves absolute file paths in bootstrap context (not just filenames), surfaces failed mutating tool operations to prevent false success messages, and clears stale error state after successful retries.

  • Bootstrap context now uses file.path instead of file.name, ensuring agents target the correct absolute file paths
  • Mutating tools (write, edit, message, exec, etc.) now always surface failures even when the model produces text output, preventing "I changed it" claims when actions failed
  • Successful tool retries now clear lastToolError state to prevent old failures from appearing in later replies
  • New tests validate all three fixes including regression coverage

Confidence Score: 4/5

  • This PR is safe to merge with low risk
  • Changes are focused, well-tested, and fix real agent behavior bugs. The bootstrap path fix is straightforward (using full paths instead of basenames). The mutating tool error surfacing logic is sound with explicit allowlist and heuristics. Error state clearing prevents stale failures. Comprehensive test coverage validates all three fixes. Minor deduction for the heuristic-based mutating tool detection which could theoretically miss edge cases.
  • No files require special attention

Last reviewed commit: 08ee3b2

(4/5) You can add custom instructions or style guidelines for the agent here!

@openclaw-barnacle openclaw-barnacle bot added agents Agent runtime and tooling size: S labels Feb 14, 2026
@gumadeiras gumadeiras self-assigned this Feb 14, 2026
@gumadeiras gumadeiras force-pushed the codex/fix-bootstrap-path-and-tool-truthfulness branch 5 times, most recently from 9ce480a to 6dd9eca Compare February 14, 2026 21:58
@gumadeiras gumadeiras force-pushed the codex/fix-bootstrap-path-and-tool-truthfulness branch from 6dd9eca to 385dcbd Compare February 14, 2026 22:00
@gumadeiras gumadeiras merged commit dbdcbe0 into openclaw:main Feb 14, 2026
9 checks passed
@gumadeiras
Copy link
Member

Merged via squash.

Thanks @Swader!

akoscz pushed a commit to akoscz/openclaw that referenced this pull request Feb 15, 2026
…6131)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 385dcbd
Co-authored-by: Swader <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
GwonHyeok pushed a commit to learners-superpumped/openclaw that referenced this pull request Feb 15, 2026
…6131)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 385dcbd
Co-authored-by: Swader <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
vincentkoc pushed a commit to vincentkoc/openclaw that referenced this pull request Feb 15, 2026
…6131)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 385dcbd
Co-authored-by: Swader <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
snowzlm pushed a commit to snowzlm/openclaw that referenced this pull request Feb 15, 2026
…6131)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 385dcbd
Co-authored-by: Swader <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
Benkei-dev pushed a commit to Benkei-dev/openclaw that referenced this pull request Feb 15, 2026
…6131)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 385dcbd
Co-authored-by: Swader <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments