By sust4in
Deterministic context reward injection for Claude Code - detects agent drift and steers through context manipulation
View and modify agent-steer configuration (scoring weights, EWMA alphas, injection settings)
Label session outcomes (success/failure/partial) with failure mode tags for ground truth measurement
Show all learned cross-session patterns with confidence levels and capacity
Clear agent-steer session data and restart daemon for a fresh start
Show recent step history with behavioral signal values and composite scores
Executes bash commands
Hook triggers when Bash tool is used
Modifies files
Hook triggers on file write and edit operations
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Real-time behavioral steering for Claude Code agents. Detects drift, thrashing, and regression using free deterministic signals — then injects corrective context to get the agent back on track. Zero additional LLM cost.
When an AI coding agent starts repeating failed approaches, editing the same file without testing, or forgetting earlier discoveries, agent-steer detects it and steers the agent back:
localhost:7433 with score timeline, signal heatmap, and file graphAll signals are deterministic and free. No external API calls. No model training. The "policy update" happens through context manipulation — the model reads different information and makes different decisions.
# Clone and build
git clone https://github.com/sust4in/agentsteer.git
cd agentsteer
npm install
cd ui && npm install && cd ..
npm run build:all # Builds daemon + hooks + skills + dashboard
# Run Claude Code with the plugin loaded from disk
claude --plugin-dir /path/to/agentsteer
From inside a Claude Code session:
/plugin install /path/to/agentsteer
To scope to a specific project:
/plugin install /path/to/agentsteer --scope project
When the daemon is running, a real-time dashboard is available at http://localhost:7433.
Pages:
The dashboard auto-refreshes via polling and receives live events via Server-Sent Events (SSE). No additional dependencies — served by the daemon using node:http.
Multi-session support: All data pages support ?session=<id> for viewing past sessions. A session picker appears in the header when 2+ sessions exist.
To build the dashboard:
cd ui && npm install && npm run build && cd ..
For development with hot reload:
npm run ui:dev # SvelteKit dev server on :5173, proxies API to :7433
Agent-steer writes a bridge file (/tmp/agent-steer-<session>.json) on each PostToolUse with current score, step count, and health. A statusline script reads this to display a compact status in the Claude Code UI:
steer [impl] ████░░░░ 0.65 s12 ↯2
Phase indicator (e.g. [impl]) shown when scoring.phaseAware is enabled and confidence > 0.5.
Add to Claude Code settings.json:
{
"statusLine": {
"type": "command",
"command": "node \"/path/to/agentsteer/scripts/statusline.js\""
}
}
Interactive commands available inside Claude Code sessions:
| Command | Description |
|---|---|
/agent-steer:status | Daemon health, EWMA scores, session progress |
/agent-steer:signals | Recent step signals in tabular format |
/agent-steer:patterns | Learned behavioral patterns with confidence |
/agent-steer:summary | Session overview with scoring trajectory |
/agent-steer:config | View/modify scoring and injection config |
/agent-steer:reset | Clear session data and restart daemon |
Tool call -> PostToolUse hook -> Signal extraction -> Phase detection -> Behavioral scoring -> SQLite persist
-> PostToolUse context (test counts, errors, repetition alerts)
|
Next tool call -> PreToolUse hook <- Injection decision <- EWMA drift detection
<- Thompson Sampling <- Effectiveness tracking (ITS)
<- PPR file context <- Dependency graph
<- Learned patterns <- Cross-session learning
npx claudepluginhub sust4in/agentsteerComplete AI coding workflow system. Self-correcting memory + persistent FTS5-indexed research wikis + auto-research loop + multi-LLM council on a single SQLite store. 41 skills, 8 agents, 23 commands, 37 hook scripts across 24 events. Cross-agent via skills add.
MCP server that saves 98% of your context window with session continuity. Sandboxed code execution in 11 languages, FTS5 knowledge base with BM25 ranking, and automatic state restore across compactions.
Open-source, local-first Claude Code plugin for token reduction, context compression, and cost optimization using hybrid RAG retrieval (BM25 + vector search), reranking, AST-aware chunking, and compact context packets.