Skip to main content
November 23, 2026

Your Model Doesn't Know the Date: Your Harness Does

Your Model Doesn't Know the Date: Your Harness Does

Ask a chat app for today's date and it answers. Send the same question to the same model through a bare API call, or type it into ollama run, and you get a guess, an apology or a date from last year. People call this a weak model. It is not. The model has weights and a context window, and nothing in either one says what day it is.

The chat app answers because somebody put the date into the context. Anthropic publishes its app system prompts, and the Haiku 5.5 prompt says the model "answers the way a highly informed individual in June 2026 would if talking to someone from {{currentDateTime}}." That {{currentDateTime}} is a template variable that the app fills in. The same page says: "These updates do not apply to the Claude API." On the API, the date is your job.

The date is the simplest case of a general rule: everything an agent does beyond producing tokens comes from the harness.

What the Model Does and What the Harness Does

Job Model Harness
Know the current date and time No Puts it in the prompt or exposes a clock tool
Know which tools exist No Sends tool names, descriptions and JSON schemas with every request
Decide to call a tool Yes Offers the choice (auto, required, a named tool, none)
Emit the call in a parsable format Partly Parses it, or constrains decoding so it must parse
Run the tool No Executes it, with credentials the model never sees
Ask a human first No Permission prompts, allowlists, stored approvals
Recover from a bad call Partly Validates, returns an error, retries or stops
Remember earlier steps No Keeps the message history and compacts it

The model proposes calls. The harness does the rest.

How a Tool Call Actually Happens

The model cannot call a tool that the request does not define. In the Anthropic API, tools go in a tools array with a name, a description and an input_schema. The tool use overview says client tools "run in your application," and describes the loop: "Claude responds with stop_reason: "tool_use" and one or more tool_use blocks. Your code runs the operation and sends back a tool_result." The API also "automatically includes a special system prompt for the model that enables tool use." The model was trained on a call format, but it sees your tools only because the request carries them.

Ollama works the same way: a tools array in, message.tool_calls out, and your code appends a tool message and calls chat again, in a section titled "Multi-turn tool calling (Agent loop)." Here is the date problem solved with that loop. Every line is harness:

from datetime import datetime, timezone
from ollama import chat

def get_current_time() -> str:
    """Return the current UTC time in ISO 8601."""
    return datetime.now(timezone.utc).isoformat()

registry = {"get_current_time": get_current_time}
messages = [{"role": "user", "content": "What is today's date?"}]

for _ in range(5):  # a step limit is a harness decision too
    response = chat(model="qwen3:30b-a3b", messages=messages, tools=[get_current_time])
    messages.append(response.message)
    if not response.message.tool_calls:
        break
    for call in response.message.tool_calls:
        fn = registry.get(call.function.name)
        result = fn(**call.function.arguments) if fn else f"error: unknown tool {call.function.name}"
        messages.append({"role": "tool", "tool_name": call.function.name, "content": result})

print(response.message.content)

The tool definition, the registry, the step limit, the unknown-tool guard and the history are all yours. The model supplied one tool call.

Short runs can take the date from the system prompt at no cost. Long runs need a tool, because a date written at the start of a two-hour session goes stale.

Why a Bare Ollama Install Has No Tools

Ollama is an inference server. It runs the model, applies the chat template and returns tool_calls. It does not run them. The example tools in its tool support announcement, "Functions and APIs," "Web browsing," and "Code interpreter," are all things the caller writes. Even Ollama's own web search is a hosted REST API that needs "a free Ollama account" and an API key. In its search agent example, your code still passes tools=[web_search, web_fetch] and runs the loop.

That is the right split. An inference server that ran shell commands on its own would be a harness with no permission model.

Native Tool Calling vs Structured Output

There are two ways to get machine-readable output from a model, and they fail in different ways.

Native tool calling with a parser. The model writes tool-call markup in its own format, and the server parses it. The vLLM tool calling docs say that in automatic mode "vLLM extracts tool calls from raw text, so arguments may occasionally be malformed or violate the function's parameter schema," and that "Llama's smaller models frequently fail to emit tool calls in the correct format." Our local models docs describe a quieter failure: Ollama drops a tool call whose name is not one of the defined tools and returns an empty answer without an error.

Constrained decoding. The server compiles the schema into a grammar and masks invalid tokens. OpenAI's Structured Outputs announcement says this "effectively lowers the probability of invalid tokens to 0." Anthropic's structured outputs docs offer it two ways: JSON outputs for the response, and strict: true for tool inputs. vLLM puts the limit plainly: "You are guaranteed a validly-parsable function call - not a high-quality one."

Parsed tool calls Constrained decoding
Typical failure Malformed or missing call, leaked markup Valid JSON with wrong content
How it looks Parse error, or a silent empty answer Looks fine, so it passes checks
Truncation Half a call in the text At max_tokens the output can be incomplete and break the schema
Refusal Plain text instead of a call A refusal can override the schema
Schema limits Any schema, but nothing enforces it Only a subset of JSON Schema; Anthropic returns 400 for unsupported features
Other costs Retries First request with a new schema adds latency; OpenAI's version "is not compatible with parallel function calls"

In the harness: with parsed calls, validate each call against its schema, return the error as a tool result so the model can fix it, and treat an empty answer as a failure. With constrained decoding, check stop_reason first, then check the values, because valid JSON can still be wrong.

Permissions Are a Harness Feature

A model proposes rm -rf build/. Whether anything happens is decided outside the model. In Claude Code, the permissions docs say "Rules are evaluated in order: deny, then ask, then allow." The scope of "Yes, and don't ask again" depends on the tool. For Bash it is "Permanently per repository and command." For file edits it is "Until session end." Permanent approvals are saved to .claude/settings.local.json. The same model behind a different client has none of it.

Prompts can ask a model to be careful. Only the harness can refuse a call. We made the longer case in agent blast radius: put the hard limits where the model cannot argue with them.

Checklist: When a Model "Can't Do X"

Before you swap the model, check the harness:

  1. Is the fact in the context? Date, time zone, environment name. If not, add it to the prompt or expose a tool.
  2. Was the tool sent? Log the request body and look for the tools array. A tool in your config but not in the request does not exist for the model.
  3. Does the server return tool calls? vLLM returns them only with --enable-auto-tool-choice and a --tool-call-parser.
  4. Is the context long enough? A small server context can cut tool definitions or results without an error.
  5. Did the call parse? Count parse failures and empty answers as their own metric.
  6. Was it refused, or never asked? Read the permission log before you blame the model.

How Akmatori Splits the Work

Akmatori is a harness for incident investigation, so this split is the product. Per the architecture docs, the model reaches every connector through one generic tool, gateway_call, and a generated connected-tools skill that lists every enabled tool instance with its parameters and examples. The API server builds an allowlist for each run from the kind of run, and the MCP Gateway "refuses every tool outside it." Credentials stay in PostgreSQL and the gateway reads them at call time, so an agent never sees them.

The model still has to make a correct call. The local models docs report that qwen3:30b-a3b on Ollama produced a correct gateway_call in 13 of 28 requests, and the smaller Qwen3 sizes in 0 of 2 each. For models that do the job on your own hardware, see self-hosted AI SRE with local models.

Conclusion

A model predicts the next token. The date, the tools, the call format, the approvals, the retries and the history come from the harness. When an agent "can't" do something, read what the harness sent before you change the model.

If your team wants AI-assisted incident workflows where tool schemas, allowlists and credentials live in the harness and not in the prompt, Akmatori helps SRE teams investigate alerts, coordinate response, and automate safe infrastructure actions. Powered by Gcore for global infrastructure reliability.

Automate incident response and prevent on-call burnout with AI-driven agents!