Anti-AIClone

Log date · Thu

Can an AI agent harness be inferred from its outputs?

Yes, behavior can reveal orchestration. A local rule-based comparison shows why held-out cases matter when assessing exposure.

The answer: hidden code can still expose behavior

Yes. Keeping code on a server reduces direct exposure, but a user can still observe relationships between requests and responses. In our local sample, two candidates matched all four observed cases; on four held-out cases the memorizing candidate matched 2/4 and the rule candidate matched 4/4.

This deterministic Python illustration concerns behavioral matching and generalization; it is not a replication of the paper, and runs neither a model nor a real multi-agent system. We wrote the candidate rule by hand; it was not inferred automatically.

Comparison at a glance
QuestionResult
Observed casesBoth candidates: 4/4
Held-out casesMemorized: 2/4; rule: 4/4
Does matching prove identical internals?No; only outputs are compared
Defense priorityLimit privileges and usage; review outputs

What the paper proposes

At 12:54 UTC on 30 July 2026, v1 of “Agent Harness Distillation: Inference-Time Harness Extraction and Exploitation in Autonomous Multi-Agent Systems” was submitted to arXiv. [1] The authors describe an inference-time harness as a structure coordinating reasoning and action. Their method first builds an initial harness from black-box responses, then refines it to align with the target’s behavior.

The authors report experiments on real systems with multiple backbone models and propose a deception-based defense. The abstract gives no numerical results, so it cannot establish extraction accuracy, cost or production defense effectiveness. The paper brings interaction behavior into the threat model; it does not mean an observer necessarily recovers the original code, prompts or tool chain.

Returning internal plans, tool names or detailed errors to a client increases the information available to an observer. Even a final answer can reveal a stable decision boundary. Classify assets by impact: public product behavior, internal orchestration, user data and privileged operations each need different controls.

Four observed cases are not enough

The sample models an approval service: urgent requests go to review; otherwise amounts up to 100 are approved. We wrote one candidate that memorizes four inputs and another with the same boundary rule. We ran everything locally with Python 3.9.1, without network requests.

The target rule we wrote.
def target(amount, urgent):
    if urgent:
        return "review"
    return "approve" if amount <= 100 else "review"

The observed inputs use only amounts 20 and 120 with both urgency states. The held-out set uses 99, 100, 101 and an urgent request to exercise the boundary and combinations. The contiguous transcript excerpt below shows that the memorizer defaults to review for unseen inputs, so it misses the non-urgent 99 and 100 cases.

Verbatim held-out output.
== held-out ==
amount=99 urgent=False target=approve memorized=review candidate=approve
amount=100 urgent=False target=approve memorized=review candidate=approve
amount=101 urgent=False target=review memorized=review candidate=review
amount=99 urgent=True target=review memorized=review candidate=review
memorized: 2/4 match
candidate: 4/4 match

Four matches do not establish equivalence on every input. Two implementations can agree on a finite sample while using different internal processes. Set aside cases in advance, cover boundaries, combinations and failures, and record the sample distribution. Do not report only the cases used to adjust a candidate.

Recommendations by risk

These are engineering recommendations, not defense effects measured in our experiment. Define normal usage first, then evaluate false positives and business impact in a test environment.

Recommendations by asset and situation
SituationRecommendation
Outputs contain internal detailsReview responses and errors; remove plans and tool details users do not need.
High-volume interfaceApply account and source quotas and rate limits; monitor repeated boundary sweeps.
Agent can perform sensitive actionsAuthorize separately on the server, restrict tool privileges and log actions.
Considering deceptionEvaluate quality, risk of misleading users and rollback first.

OWASP recommends tuning rate limits to business needs and limiting operations and third-party spending. [2] Quotas can affect cost and probing speed, but cannot guarantee that low-rate or distributed observation stops. Provide human review and an appeal path for alerts instead of treating every legitimate batch as abuse.

Separate tool authority from prompts: the server should independently authorize important actions against user identity, resource ownership and business rules. Even if a model proposes a tool call, the execution layer should reject an unauthorized request. Log necessary operations and outcomes while controlling retention and access to sensitive data.

Check your own agent

Create an isolated test set for a service you are authorized to assess. Choose ordinary requests, boundaries and failure paths; record expected public responses and fields that must remain private. Python’s unittest can organize inputs and expected responses into repeatable checks. [3]

Check the Python version and run tests in your own project.
python3 --version
python3 -m unittest discover -s path/to/your-app

For a real service, pin the version, model configuration and test account. Record request counts, response types, tool permissions and outcomes for each set. Keep held-out cases separate from cases used to tune the policy. For nondeterministic outputs, define semantic agreement in advance and repeat runs to observe variation. Keep user data, internal prompts and keys out of shared test reports.

Finally exercise the controls themselves: can a normal user complete critical flows, does the service reject requests as expected after a quota, and is an authorization failure auditable? Repeat after model, tool or policy changes, comparing product quality and false positives so that concealing details does not damage the experience.

Your checklist

  • Inventory public outputs, internal orchestration and sensitive tool privileges.
  • Reserve boundary, combination and failure cases for independent testing.
  • Review responses and errors for unnecessary internal details.
  • Set account and source quotas and verify false-positive handling.
  • Authorize sensitive operations independently on the server and retest regularly.

Primary sources

All sources and reproduction status ↗