agent_lesson_add
Record a lesson learned during a run to prevent repeating failures. Recall it at next boot, with scope for session, agent, or workspace.
Instructions
Record a lesson learned during a run so the agent doesn't repeat the failure. Embedded for goal-relevant recall at the next agent_boot. Mirrors the vibe-loop '## Lessons' log. scope controls breadth: 'session' (this run), 'agent' (this agent always), or 'workspace'.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"session_id": "<session_id>",
"what_failed": "<what_failed>"
},
"name": "agent_lesson_add"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| why | No | Why it failed | |
| scope | No | How broadly the lesson applies (default 'session') | |
| session_id | Yes | Session this lesson came from | |
| try_instead | No | What to do differently next time | |
| what_failed | Yes | What was attempted that failed |