Bug
When a workspace is active and Shell Access and/or Web Search are enabled, the agent reports no access to `bash`, `python`, or `web_search` for vague or short opening messages.
Root Cause
`agent_loop.py` has a fast path for low-signal turns when a workspace is active. It builds `_relevant_tools` from scratch:
```python
_relevant_tools = set(ALWAYS_AVAILABLE)
_relevant_tools |= (_DOMAIN_TOOL_MAP["files"] & PLAN_MODE_READONLY_TOOLS)
```
`PLAN_MODE_READONLY_TOOLS` includes `web_search` and `web_fetch` but not `bash` or `python`. `_DOMAIN_TOOL_MAP["files"]` includes `bash` and `python` but not `web_search` or `web_fetch`. The intersection excludes all three.
The fast path never consults `disabled_tools`. The Shell Access and Web Search toggles only prevent tools from entering `disabled_tools` — they do not add tools to `_relevant_tools`. Since the fast path builds `_relevant_tools` from scratch and then skips RAG retrieval (the set is already non-empty), the domain-based additions that would normally include `web_search` never run.
Fix
Consult `disabled_tools` in the workspace fast path to include tools the user explicitly enabled:
```python
if "bash" not in disabled_tools:
_relevant_tools.add("bash")
if "python" not in disabled_tools:
_relevant_tools.add("python")
if "web_search" not in disabled_tools:
_relevant_tools.add("web_search")
_relevant_tools.add("web_fetch")
```
Steps to Reproduce
- Set a workspace path in the UI.
- Enable Shell Access and/or Web Search.
- Send a short or vague message: "help me", "what do we have here", "let's get started".
- The agent responds that it has no access to `bash`, `python`, or `web_search`.
Notes
PR #4398 (merged 2026-06-16) fixed the structurally identical problem for scheduled task agents. This fix follows the same pattern.
Bash/python verified. Web search/web_fetch unverified — issue remains open until confirmed.
Bug
When a workspace is active and Shell Access and/or Web Search are enabled, the agent reports no access to `bash`, `python`, or `web_search` for vague or short opening messages.
Root Cause
`agent_loop.py` has a fast path for low-signal turns when a workspace is active. It builds `_relevant_tools` from scratch:
```python
_relevant_tools = set(ALWAYS_AVAILABLE)
_relevant_tools |= (_DOMAIN_TOOL_MAP["files"] & PLAN_MODE_READONLY_TOOLS)
```
`PLAN_MODE_READONLY_TOOLS` includes `web_search` and `web_fetch` but not `bash` or `python`. `_DOMAIN_TOOL_MAP["files"]` includes `bash` and `python` but not `web_search` or `web_fetch`. The intersection excludes all three.
The fast path never consults `disabled_tools`. The Shell Access and Web Search toggles only prevent tools from entering `disabled_tools` — they do not add tools to `_relevant_tools`. Since the fast path builds `_relevant_tools` from scratch and then skips RAG retrieval (the set is already non-empty), the domain-based additions that would normally include `web_search` never run.
Fix
Consult `disabled_tools` in the workspace fast path to include tools the user explicitly enabled:
```python
if "bash" not in disabled_tools:
_relevant_tools.add("bash")
if "python" not in disabled_tools:
_relevant_tools.add("python")
if "web_search" not in disabled_tools:
_relevant_tools.add("web_search")
_relevant_tools.add("web_fetch")
```
Steps to Reproduce
Notes
PR #4398 (merged 2026-06-16) fixed the structurally identical problem for scheduled task agents. This fix follows the same pattern.
Bash/python verified. Web search/web_fetch unverified — issue remains open until confirmed.