The agent says "I have no access to your files" — what broke

The model answers "I cannot access your project" even though the agent is configured. Almost always it's tool calls, not the model.

3 min · · Updated · harness · инструменты · диагностика

A recognisable symptom: you ask the agent to look at a file and fix it, and you get back a polite "I don't have access to your file system, paste the contents here" — or finished code with a note to apply it by hand.

The first thought is that the model is weak. It almost never is. Here is what actually happens.

Where the chain breaks

The model does not read files. It asks the agent to: instead of text it returns a structured call, "run run_bash with the argument cat app/models.py". The agent runs the command and sends the result back.

For that to work the call has to survive the whole trip. If something sits between agent and model — a gateway, a proxy, a router — it must translate in both directions: the agent's tool definitions going up, and the model's call coming back down.

Lose that in transit and the model genuinely has no tools. It honestly says it cannot reach your project and offers the only thing left: writing the code as text.

So the model's complaint is true. Only the conclusion people draw from it is wrong.

A one-minute check

Send a request by hand and see whether the reply contains a tool call.

bash
curl -s https://api.zukko.pro/v1/chat/completions \
  -H "Authorization: Bearer fetch_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-5",
    "max_tokens": 200,
    "messages": [{"role": "user", "content": "How many files are here? Count them with bash."}],
    "tools": [{
      "type": "function",
      "function": {
        "name": "run_bash",
        "description": "Run a bash command",
        "parameters": {
          "type": "object",
          "properties": {"command": {"type": "string"}},
          "required": ["command"]
        }
      }
    }]
  }'

The reply should carry a tool_calls block naming run_bash with an argument like {"command": "ls | wc -l"}. If plain prose comes back instead, tool calling is broken — and not by your agent.

For the Anthropic format the same check runs against https://api.zukko.pro/v1/messages, where the call arrives as a tool_use block inside content.

Common causes

Tools are disabled in the agent. Most harnesses have a read-only mode or a permissions toggle. Check that first — it's free.

The model doesn't support function calling. Some still don't, especially the small cheap ones. If a model can't call tools at all, no agent will work on top of it.

The middleman drops the translation. The nastiest case, because from outside it looks like a stupid model. The request above settles it.

The output limit is too low. Some models spend tokens on internal reasoning before the call. With a tight max_tokens the budget runs out before the call is emitted, and you get an empty or truncated reply. Raise it to a few thousand and retry.

About several calls in a row

A variant of the same trouble: the first call goes through, then the agent starts receiving garbage — two commands' arguments glued into one string.

That happens when a middleman assembles a streamed reply and splits calls badly: some providers number every call zero, and naive assembly by index merges them into a single block. From outside it looks like the agent losing its mind on the second command.

Check it the same way, with a task that needs two commands. If the reply holds one call with invalid JSON in its arguments instead of two clean ones, you've found it.

What to do

If the check shows calls aren't arriving and your agent settings are fine, raise it with your provider — it's their side. At Zukko tool-call translation works in both formats and for every text model, including providers that natively speak only OpenAI.

zukko

Pay 25×
less

for Claude Code & ChatGPT

One fetch_* key and base URL api.zukko.pro — for Cursor, Claude Code, Codex, and any SDK.

Get API keyDocumentation

api.zukko.pro · fetch_*

Agent can't read files or run bash — why · Zukko