Skip to content

fix: preserve explicit node routing under elevated auto exec#61739

Merged
obviyus merged 2 commits into
mainfrom
fix/exec-auto-node-elevated-routing
Apr 6, 2026
Merged

fix: preserve explicit node routing under elevated auto exec#61739
obviyus merged 2 commits into
mainfrom
fix/exec-auto-node-elevated-routing

Conversation

@obviyus

@obviyus obviyus commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • keep explicit host=node routing when exec runs with elevated defaults under tools.exec.host=auto
  • resolve exec targets in one path so elevated routing no longer bypasses override validation/selection
  • add regressions for the resolver seam and the exec tool path

Testing

  • pnpm test src/agents/bash-tools.exec-runtime.test.ts src/agents/bash-tools.exec.approval-id.test.ts

Linked Issue

@greptile-apps

greptile-apps Bot commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Fixes a routing bug where an explicit host=node per-call override was silently dropped when tools.exec.host=auto and elevated exec defaults were active. The elevated path previously early-returned using only configuredTarget (bypassing requestedTarget and validation); the fix runs validation first, merges requestedTarget ?? configuredTarget into selectedTarget, and applies the elevation guard to that merged value. A mismatched target under elevated+node now throws instead of silently routing to node.

Confidence Score: 5/5

Safe to merge — targeted fix with no correctness issues found and good regression coverage.

All changes are correct and well-tested. No P0/P1 issues found. The logic is sound: validation now runs before elevation, selectedTarget correctly incorporates the per-call requestedTarget override, and downstream callers of effectiveHost/selectedTarget are unaffected by the change in returned values.

No files require special attention.

Reviews (1): Last reviewed commit: "fix: preserve explicit node routing unde..." | Re-trigger Greptile

@obviyus obviyus self-assigned this Apr 6, 2026
@obviyus
obviyus force-pushed the fix/exec-auto-node-elevated-routing branch from 275cb1e to 3222c63 Compare April 6, 2026 07:54
@obviyus
obviyus merged commit 7749765 into main Apr 6, 2026
20 of 27 checks passed
@obviyus
obviyus deleted the fix/exec-auto-node-elevated-routing branch April 6, 2026 07:56
@obviyus

obviyus commented Apr 6, 2026

Copy link
Copy Markdown
Contributor Author

Landed on main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: exec host=node regression in 2026.4.2 — agent exec always routes to gateway

1 participant