#21820: fix(exec): show requested host in disallowed host hint
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
#21509: fix: show requestedHost instead of configuredHost in exec host erro...
by sleitor · 2026-02-20
91.2%
#21562: fix: exec host error message shows configuredHost instead of reques...
by TopangaLudwitt · 2026-02-20
89.7%
#21280: fix(exec): reflect configured exec host in tool schema default (#11...
by Asm3r96 · 2026-02-19
80.1%
#11185: fix #11150 - [Bug]: Exec tool schema host default ignores tools.exe...
by Lucky-Lodhi2004 · 2026-02-07
77.1%
#11854: fix: resolve per-agent tools.exec config in pi-tools
by Yida-Dev · 2026-02-08
75.4%
#4897: fix: config logic issues (#4689, #4654)
by lailoo · 2026-01-30
74.7%
#18415: fix(agents): suppress benign exec exit code 1 from tool error surfa...
by aldoeliacim · 2026-02-16
73.8%
#21661: fix(agents): treat approval timeout as denial regardless of askFall...
by AI-Reviewer-QS · 2026-02-20
73.8%
#17788: fix: correct config path in sessions_spawn error hint (v2)
by Limitless2023 · 2026-02-16
73.4%
#9433: fix: pass raw command string to node exec instead of argv array
by dbottme · 2026-02-05
72.5%