Repository navigation
Description
Summary
In a session where approvals are not available (CI, tools.safety.approval_behaviour with no approver), tools that require approval are still offered to the model. Calling them is refused mid-turn with a message telling the agent to "tell the user what you need", which an unattended agent cannot do. The agent then works around the missing tool for the rest of the run.
Seen on an infer-action v0.58.0 run with CLI v0.233.0: https://github.com/edenreich/das-ist-berlin/actions/runs/39459666409
Steps to Reproduce
- Run
infer agentnon-interactively (infer-action) with the default safety config. - Have the agent start a background shell with
run_in_backgroundand then read it withBashOutput, or callKillShellorBrowserNavigate. - Have it run a Bash command outside the allowlist, such as
bun /tmp/x.tsorls ~/.cache/ms-playwright.
Expected Behavior
Either the tool is not in the tool list for that session, or the refusal says the tool is unavailable in this session and names what is allowed, so the model does not plan around it. An agent run with no approver should never be told to ask the user.
Actual Behavior
Seven calls were refused:
Blocked: BashOutput requires approval, but approvals are not available in this session (tools.safety.approval_behaviour). The action was NOT executed. Do not retry the same call - tell the user what you need and ...
Blocked: KillShell requires approval, but approvals are not available in this session ...
Blocked: BrowserNavigate requires approval, but approvals are not available in this session ...
Blocked: Bash requires approval, but approvals are not available in this session ... (bun /tmp/mapillary2.ts)
Blocked: Bash requires approval, but approvals are not available in this session ... (ls ~/.cache/ms-playwright)
With BashOutput refused, every background shell's output was unreadable. The agent reasoned "background shells' output stays unreadable - I must design everything so scripts WRITE TO FILES" and rewrote its scripts to write files and poll them with Wait, which cost turns and context. BrowserNavigate was refused although the workflow had computer-use: 'true' and INFER_BROWSER_USE_ENABLED=true, so the demo it was asked to record could not have been made.
Suggested fix:
- When approvals cannot be granted, filter approval-gated tools out of the tool definitions sent to the model, or mark them as unavailable in their description.
- Make the refusal text for unattended sessions say the tool is unavailable here and, for Bash, which patterns are allowed, instead of asking the agent to ask the user.
BashOutputon a shell the agent itself started should not need approval: reading output cannot do more than the command already allowed.
Activity
inference-gateway-releaser commentedon Oct 20, 2026
🎉 This issue has been resolved in version 0.233.2 🎉
The release is available on:
Your semantic-release bot 📦🚀