# Testing an Agent Harness Without Ever Calling the Model

DevFeed: [Testing an Agent Harness Without Ever Calling the Model](<https://devfeed.tech/articles/testing-an-agent-harness-without-ever-calling-the-model-34114.md>)

Original publisher: [Read original article](<https://philipptheserver.com/posts/testing-an-agent-harness/>)

Author: Philipp Lehmann (philipp.lehmann@gruppe.ai)

Published: 2026-07-31T07:00:00Z

Content type: tutorial

Language: en

Sources: [Philipp Lehmann](<https://devfeed.tech/sources/philipp-lehmann.md>)

Topics: [Testing](<https://devfeed.tech/topics/testing.md>), [Agent Harness](<https://devfeed.tech/topics/agent-harness.md>), [Pytest](<https://devfeed.tech/topics/pytest.md>), [Unit testing](<https://devfeed.tech/topics/unit-testing.md>), [coding](<https://devfeed.tech/topics/coding.md>)

Tags: [agent](<https://devfeed.tech/tags/agent.md>), [agent-harness](<https://devfeed.tech/tags/agent-harness.md>), [agents](<https://devfeed.tech/tags/agents.md>), [api](<https://devfeed.tech/tags/api.md>), [network](<https://devfeed.tech/tags/network.md>), [permission](<https://devfeed.tech/tags/permission.md>), [pytest](<https://devfeed.tech/tags/pytest.md>), [python](<https://devfeed.tech/tags/python.md>), [recording](<https://devfeed.tech/tags/recording.md>), [testing](<https://devfeed.tech/tags/testing.md>), [unit-testing](<https://devfeed.tech/tags/unit-testing.md>)

## AI overview

This tutorial explains how to unit test a coding agent's tool-call permission layer without calling a model. It recommends separating the decision function from model responses, using recorded real-request fixtures, and keeping the policy module independent of any LLM SDK.

## Source excerpt

Unit testing a coding agent's tool-call permission layer with pytest and recorded fixtures: allow, deny or ask decisions with no model or API key.