← Back to PRs

#21820: fix(exec): show requested host in disallowed host hint

by AlexAnys open 2026-02-20 12:21 View on GitHub →
agents size: XS
Fixes #21501. ### What When `exec` is called with a host that differs from the configured default, the error message used to suggest configuring `tools.exec.host` to the *configured* host (self-referential). This change makes the hint show the *requested* host instead. ### Tests - Updated `src/agents/pi-tools-agent-config.e2e.test.ts` to assert the full error message. - Verified locally: `vitest run --config vitest.e2e.config.ts src/agents/pi-tools-agent-config.e2e.test.ts -t "should apply agent-specific exec host defaults over global defaults"` <!-- greptile_comment --> <h3>Greptile Summary</h3> Fixed the error message hint when `exec` is called with a disallowed host to show the *requested* host instead of the *configured* host in the suggestion. - **Core fix**: Changed line 288 in `bash-tools.exec.ts` from `configuredHost` to `requestedHost` in the error message hint - **Test improvement**: Updated test assertion to verify the complete error message including the corrected hint - **Import reordering**: Incidental formatting changes to group type imports (likely from auto-formatter) <h3>Confidence Score: 5/5</h3> - This PR is safe to merge with minimal risk - The change is a simple one-line fix to an error message that was displaying unhelpful information. The logic is correct: when a requested host differs from the configured host, the error should suggest configuring to the requested host (what the user wants) rather than the configured host (what's already set). The test was appropriately updated to verify the full error message. - No files require special attention <sub>Last reviewed commit: 1c4d234</sub> <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs