The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
docs(contributing): name the cause and the remediation in user-facing error messages
Konstantin Khlopkov0e7ffc641d55
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 0e6761ee18a..f6fc6e444f6 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -341,6 +341,7 @@ User message → AIAgent._run_agent_loop()- **PEP 8** with practical exceptions (we don't enforce strict line length)- **Comments**: Only when explaining non-obvious intent, trade-offs, or API quirks. Don't narrate what the code does — `# increment counter` adds nothing- **Error handling**: Catch specific exceptions. Log with `logger.warning()`/`logger.error()` — use `exc_info=True` for unexpected errors so stack traces appear in logs+- **Error messages**: every user-facing error message names the actual cause and the remediation step — never the proximate symptom. A missing API key is "no OpenRouter API key configured — set `OPENROUTER_API_KEY`", never "payment/credit error"; a failed request logs the exception class and message (secret-redacted) rather than an empty reason; a timed-out long job reports the timeout and where the job went, not a fallback-routing noise string. If you know the cause, say it; if you don't, say what you do know plus what to check — never a placeholder that points somewhere else.- **Cross-platform**: Never assume Unix. See [Cross-Platform Compatibility](#cross-platform-compatibility)---