adaptive-learner — Claude Code subagent: what it does, how to install
adaptive-learner — a subagent that pulls similar past cases from ReasoningBank before it starts and files the outcome afterwards, so later runs lean on what already happened.
no license ★ 850 updated 2026-10-26
.claude/agents/adaptive-learner.mdWhat adaptive-learner does
The agent works in a loop instead of starting cold. Before a task it asks ReasoningBank for related memories, then executes, then judges how the run went, then stores a short lesson. The pre and post hooks in the agent file handle both ends without you prompting them.
Ranking is weighted: semantic similarity carries 65%, past reliability 20%, recency 15%, diversity 10%. Only the top three come back, which keeps the context small. Failures get stored too, as approaches to avoid next time. Hook commands tag entries with the adaptive-learning domain.
Both hooks shell out to npx agentic-flow@latest, so a machine without npx or npm registry access gets none of the memory behaviour — a plain prompt and no loop.
What it helps with
- reuse a past JWT auth fix instead of starting from zero
- find out why the earlier debugging pass did not hold
- keep a working error-handling pattern in agent memory
- compare iterations of an API design by success rate
- track how token spend falls when a task repeats
Example prompts for the agent
- Use the adaptive-learner subagent to add JWT auth and check what earlier attempts in the
adaptive-learningdomain got wrong. - Hand this to adaptive-learner: figure out why
auth.spec.tsfails, then distill the finding into memory. - Ask adaptive-learner to draft the REST endpoints and compare the result against the last two runs.
How to install adaptive-learner
Manually: put the files in place
.claude/agents/adaptive-learner.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/adaptive-learner.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/adaptive-learner.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about adaptive-learner
How do I install adaptive-learner in Claude Code?
Put the agent file at .claude/agents/adaptive-learner.md.
What does adaptive-learner do?
It looks up related past tasks in ReasoningBank before starting and stores a short review after finishing. Its approach shifts between runs as a result.
What does the memory layer need in order to run?
The hooks call npx agentic-flow@latest, so npx and access to the npm registry are required. Entries are tagged with the adaptive-learning domain.