#21562: fix: exec host error message shows configuredHost instead of requestedHost
agents
size: XS
## Summary
One-character fix: change `configuredHost` → `requestedHost` in the exec host error message hint.
## Problem
When an LLM agent requests an exec host that differs from the configured host, the error message suggests configuring the *already-configured* value, making the hint self-referential and useless.
**Before:**
```
exec host not allowed (requested node; configure tools.exec.host=sandbox to allow)
```
**After:**
```
exec host not allowed (requested node; configure tools.exec.host=node to allow)
```
## Files Changed
- `src/agents/bash-tools.exec.ts` — line 288
Fixes #21501
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Fixed a self-referential error message in the exec host validation logic. When an agent requests a different exec host than configured, the error message now correctly suggests configuring the *requested* host value instead of the already-configured value.
- Changed `src/agents/bash-tools.exec.ts:288` from `configuredHost` to `requestedHost` in the error message hint
- The fix transforms unhelpful messages like "configure tools.exec.host=sandbox to allow" (when sandbox is already configured) into actionable ones like "configure tools.exec.host=node to allow" (when node was requested)
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with no risk
- The change is a trivial one-character fix that corrects a logic error in an error message. The fix changes which variable is referenced in the error message from `configuredHost` (already configured) to `requestedHost` (the value needed). This makes the error message actionable. The test suite only checks that the error is thrown, not the exact message content, so no test updates are needed. The change is isolated, well-understood, and fixes a clear bug.
- No files require special attention
<sub>Last reviewed commit: 33d0d65</sub>
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#21509: fix: show requestedHost instead of configuredHost in exec host erro...
by sleitor · 2026-02-20
92.7%
#21820: fix(exec): show requested host in disallowed host hint
by AlexAnys · 2026-02-20
89.7%
#4897: fix: config logic issues (#4689, #4654)
by lailoo · 2026-01-30
80.6%
#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
78.9%
#17788: fix: correct config path in sessions_spawn error hint (v2)
by Limitless2023 · 2026-02-16
78.9%
#9433: fix: pass raw command string to node exec instead of argv array
by dbottme · 2026-02-05
77.5%
#9200: Fix: Strip dangerous env vars from baseEnv in host execution
by vishaltandale00 · 2026-02-05
77.0%
#23811: Config: fail closed when exec host=sandbox but sandbox mode is off
by bmendonca3 · 2026-02-22
76.2%
#3872: improve bash-tools.exec.ts code quality
by Bestom927 · 2026-01-29
75.4%