Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add agents/julymetodiev/post-cortex/error-handlinggit clone --depth 1 https://github.com/julymetodiev/post-cortexWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00253 |
| Opus 5 | $0.00000 | $0.00127 |
| Sonnet 5 | $0.00000 | $0.00051 |
| Haiku 4.5 | $0.00000 | $0.00025 |
Grade A, and why
error-handling scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
Error Handling
Quick reference for Post-Cortex error recovery.
Common Errors
| Error | Cause | Recovery |
|---|---|---|
| Session not found | Invalid session_id | session(action="list") → select valid |
| Workspace not found | Invalid workspace_id | manage_workspace(action="list") → select valid |
| Search timeout | Query too broad | Reduce limit, narrow query |
| No results | No matches | Broaden query, try global scope |
Retry Strategy
For transient errors (timeout, connection):
- Wait 0.5s
- Retry up to 3 times
- Double wait time each retry
Fallback Patterns
Search Fallback (session → workspace → global)
1. Try semantic_search with scope="session"
2. If no results → try scope="workspace"
3. If no results → try scope="global"
4. If still nothing → try query_conversation_context with keyword
Session Fallback
1. Try to use session_id from CLAUDE.md
2. If not found → session(action="list") to find alternatives
3. If no sessions → session(action="create")
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 37 lines · 0 tokens per session scan A 268f8a5c93fb
error-handling is an agent published in the GitHub repository julymetodiev/post-cortex (20 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 253 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
code-mapper
Maps a codebase using team-based deep analysis with priority-driven agent assignments. Use after initial project setup, when pending-analysis memories appear, or periodically to refresh the knowledge graph.
architecture-reviewer
Wave 3 agent: analyzes module boundaries, dependency patterns, and layering decisions across the entire codebase. Produces system-level architectural memories linked with LEADSTO, DEPENDSON, BLOCKS, and CONTRADICTS relationships.
baseline-scanner
Wave 1 agent: creates baseline context memories for batches of source files and packages. Produces 1 memory per file + 1 per package, linked with PARTOF edges.
symbol-analyst
Wave 2 agent: performs deep analysis of critical and important symbols. Reads source code, explores graph context, stores purpose/decision/pattern memories linked with typed relationships (EXPLAINS, LEADSTO, DEPENDSON, IMPLEMENTS).
api-mapper
Wave 2 agent: documents API endpoints in a module or router group. Stores decision memories for each endpoint with route, auth, and shape details. Links endpoints with DEPENDSON, LEADSTO, and PARTOF relationships.
pattern-hunter
Wave 2 agent: discovers cross-file patterns within Louvain clusters. Identifies naming conventions, shared structures, and recurring approaches. Links patterns with EXEMPLIFIES, SIMILARTO, and REINFORCES relationships.