cd /news/developer-tools/session-visualization-with-obsidian · home topics developer-tools article
[ARTICLE · art-100064] src=jimmyislive.dev ↗ pub= topic=developer-tools verified=true sentiment=· neutral

Session Visualization with Obsidian

A developer created a script that logs coding agent events into Obsidian vault files, enabling visualization of the model's reasoning path through a graph. The script, shared as a gist, uses pre/post hooks in Claude's settings.json to capture prompts, tool calls, and results, allowing users to see the step-by-step process behind the final output.

read2 min views9 publishedAug 17, 2026

on

When working with coding agents such as Claude, Codex etc. we provide the prompts and context until we get to the final result. However a lot happens behind the scenes. The model constantly makes calls to tools, MCP servers, commands etc until it arrives at the output. By knowing what path it took, we can begin to understand its reasoning better.

One way I have found useful is to use pre/post hooks to log these messages into files and then use Obsidian to visualize them.

Obsidian is a note taking app which stores notes as files on your local disk. You can link notes together and then visualize them as a graph.

In order to demonstrate this, I used claude to create a sample todo app. I had claude generate a script which would log events for me into a folder of my choice (In Obsidian lingo, this folder is called a “vault”).

Before you start prompting Claude, you will have to update its settings.json

file to call this script in the pre/post hooks:

|

1
2
3
4
5

|

"hooks": {
        "UserPromptSubmit": [{ "hooks": [{ "type": "command", "command": "python3 ~/.claude/obsidian-tracker/log_event.py prompt" }] }], 
        "PreToolUse": [{ "matcher": "mcp__.*", "hooks": [{ "type": "command", "command": "python3 ~/.claude/obsidian-tracker/log_event.py tool_call" }] }],
        "PostToolUse": [{ "matcher": "mcp__.*", "hooks": [{ "type": "command", "command": "python3 ~/.claude/obsidian-tracker/log_event.py result" }] }]
}

|

Once this is ready, just prompt claude as you would. It will log all the events into the folder configured in your script. The events are logged into numbered files representing the thought process of the model.

You can now see the visual representation of all the steps as to how the model arrived at the final result. You can also go sequentially through the files to understand them and see how the graph builds up.

And here is the final todo app:

There may be other uses of keeping your session history around, but at least now you have them in an easy visualizable format !

── more in #developer-tools 4 stories · sorted by recency
── more on @obsidian 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/session-visualizatio…] indexed:0 read:2min 2026-08-17 ·