Who it is forA developer hitting a flaky deploy, build, or third-party API call who thinks they have seen this error before.
The problemThe fix for a past failure is buried in tool call history, and re-running the failing command wastes time.
The outcomeThe past failed calls for the topic, with arguments and results, so the known trap is visible before retrying.
What you need first
- Claude Code with session transcripts in ~/.claude/projects/
- Python 3.10+ with FTS5 in the bundled sqlite3 (on macOS, install from python.org or run brew install python)
- git and bash to clone and run install.sh
- Terminal access to run the CLI and restart Claude Code
Steps
git clone https://github.com/nameforjt-afk/session-knowledge.gitcd session-knowledgethenbash install.sh- Restart Claude Code.
python3 -m sessionmcp.cli tool "docker build"python3 -m sessionmcp.cli tool "stripe" --errors
Prompt for your agent
Using the session-knowledge repo, call find_tool_call with a query for <command or service> and errors_only set to true. Expect past failed calls with their arguments and results. Verify the arguments before rerunning any command.
Caveat. The tool history comes from Claude Code transcripts only, so calls made in Cursor, Copilot, or outside Claude Code will not show up.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for nameforjt-afk/session-knowledge and "Look up the commands that failed last time"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer