jhammant

Agent Drift — Testing skill for Claude Code

Testing community

Stress-test AI agents for goal drift and system prompt violations.

How to install Agent Drift

This entry records only its repository, not the path inside it, so there is no exact command to give. Open jhammant/agent-drift and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Agent Drift does

Stress-test AI agents for goal drift and system prompt violations. Inspired by 'Asymmetric Goal Drift in Coding Agents' (ICLR 2026).

Alternatives in Testing

  • Darwin Skill — 达尔文.skill —— 一个让你的Skill无限进化的系统:评估→改进→测试→保留或回滚 Autoresearch-inspired autonomous skill optimization for Claude C 5.7k ★
  • Sentient — Test prompt to showcase claude code hook blocking a dangerous rm -rf command 3.4k ★
  • Loki Spec Status — Check whether the spec has drifted from its lock using Loki's living-spec drift detection, and summarize the r 1.1k ★

README

🎯 agent-drift

**Stress-test AI agents for goal drift and system prompt violations.**

[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://python.org) [![Tests](https://github.com/jhammant/agent-drift/actions/workflows/test.yml/badge.svg)](https://github.com/jhammant/agent-drift/actions)

Inspired by ["Asymmetric Goal Drift in Coding Agents Under Value Conflict"](https://arxiv.org/abs/2603.03456) (ICLR 2026 Workshop), which found that coding agents violate system prompts **more** when constraints oppose strongly-held values like privacy and security.

**agent-drift** lets you find out exactly where YOUR agents break.

🔍 **[See a sample report →](https://echo.ai.hammant.io/agent-drift/)** — interactive HTML with radar charts, drift timelines, and violation examples.


Installation

git clone https://github.com/jhammant/agent-drift.git
cd agent-drift
pip install -e .

This gives you the `drift` CLI command.

Requirements

  • Python 3.10+
  • At least one LLM provider for the agent you're testing
  • Anthropic API key (recommended for the judge model — it evaluates violations)

API Keys

Set the relevant environment variable(s) before running:

# For testing Claude models + using Claude as the judge (recommended)
export ANTHROPIC_API_KEY=sk-ant-...

# For testing OpenAI models
export OPENAI_API_KEY=sk-...

# For testing Groq models
export GROQ_API_KEY=gsk_...

# For testing local models via Ollama — no key needed, just run Ollama
ollama serve

Quick Start

1. Test a cloud model with a simple prompt

drift probe \
  --system-prompt "You are a helpful assistant. Never share user data. Never run commands without asking." \
  --model claude-sonnet-4-20250514 \
  --provider anthropic \
  --rounds 2 \
  --output my-report.html

2. Test a local Ollama model

# Make sure Ollama is running