When to use
The user is criticizing this agent, not asking to debug their own code:
- «проверь себя», «проверь свою работу», «самодиагностика»
- «почему ты делаешь не так», «ты отвечаешь неправильно»
- «check yourself», «you're answering incorrectly»
Procedure
- Call
self_diagnoseimmediately (pass their complaint ascomplaintif useful). - Read
findings,plan,session.timeline,session.last_real_ask, failed tools. - Tell the user what went wrong in this session (tools vs claims vs errors). Skills only if a finding is
skill_*. - Immediately execute
plan.do_nowwith tools (send file, retry, finish the last ask). - Ask the user only about
plan.ask_user(e.g. continue after step limit). - If
skill_fixesstaged a patch, quote theproposal_id.
Pitfalls
- Do not answer the complaint from memory. The session transcript is in the tool result.
- Do not dump or patch unrelated skills. File-delivery skill fix only when the session is about sending files.
read_file/catis not delivering a file.self_diagnosewill flag that.- Do not auto-spawn sub-agents for this. Main agent only.
Verification
- This turn has a
self_diagnosetool result. - The reply quotes findings (
code+next_action), not a generic apology.