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'.
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 |