Back to Writing

How I Use My AI Session History

By Isaac FlathยทDecember 30, 2025
How I Use My AI Session History

How I Use My AI Session History

I forget why I built things the way I did.

Decisions and dead ends live in my head for a week. Then they're gone: buried in Slack threads, lost in Git commits that say "refactor auth flow."

New developers ask the same questions I ask six months later:

  • Why did we build it this way?

  • Did we consider other options?

  • What were the trade-offs?

I dig through Git history and try to remember. Usually I guess.

I started using SpecStory to fix this.

It saves and indexes every AI conversation by project. My daily Claude sessions become searchable history.

Three Ways I Query My History

I use it daily. Not for storage. For retrieval.

  1. Browse: Drill into specific sessions. Conversations collapse, so I can scan fast.

href="https://isaacflath.s3.us-east-1.amazonaws.com/static/substack/68ff6da3-a960-4c59-a1d2-e4924d212fa4_2220x1566.png" class="image-link image2 is-viewable-img" target="_blank" data-component-name="Image2ToDOM">

  1. Search: Find every mention of a library or bug. Here I'm searching for "TipTap."

href="https://isaacflath.s3.us-east-1.amazonaws.com/static/substack/48bf4d9d-215e-4b2c-9070-3db0a84e42f4_2150x1660.png" class="image-link image2 is-viewable-img" target="_blank" data-component-name="Image2ToDOM">

  1. Ask "Why": The part that matters. I chat across my entire project history to understand why I made decisions.

href="https://isaacflath.s3.us-east-1.amazonaws.com/static/substack/81541ca8-1fa8-4aa6-8026-17345f704f03_1960x1662.png" class="image-link image2 is-viewable-img" target="_blank" data-component-name="Image2ToDOM">

The "Why" Behind the Code

I access SpecStory through a local agent, often Claude Code.

One app embeds a complex React editor (TipTap) inside a Python/HTMX app, which looks messy. A new developer would ask what I ask six months later:

"Why is this complex React component inside the main repo? Why wasn't it extracted into its own module?"

Code shows what. It rarely shows why.

My agent can search SpecStory, so I asked:

"Why is tip-tap editor in the repo instead of broken out into its own module?"

It searched old sessions and found context I'd forgotten:

  • Tight Coupling: The editor relies on app-specific authentication APIs.

  • High Cost: Extraction would require extensive work.

  • Pending Upgrade: We're waiting for TipTap V3 before refactoring.

  • "Good Enough" Architecture: The current "React island" approach is fine.

href="https://isaacflath.s3.us-east-1.amazonaws.com/static/substack/a6dd718b-4981-427c-9bc7-3053ddd1f532_1910x1466.png" class="image-link image2 is-viewable-img" target="_blank" data-component-name="Image2ToDOM">

It also told me what we did instead: we refactored the monolithic file in place to make it more maintainable.

Four things I learned that aren't in the GitHub repo:
  1. We considered extraction seriously.

  2. We deliberately chose to keep it coupled.

  3. This part of the codebase is historically fragile.

  4. We planned a migration for the future (TipTap V3).

That's institutional memory.

Turning Insight into Action

The analysis also found a missed opportunity: extract just the Markdown converter.

The agent flagged this component as a good candidate for extraction at the time, but the conversation moved on without a decision.

I wanted to raise this with the team, so I asked the agent for a proposal summarizing pros, cons, and reasoning.

I got a one-page summary:
  • What: A utility to convert TipTap HTML to Markdown.

  • Why: Identified as valuable, but skipped for other priorities.

  • Pros: Zero coupling, high reuse, low effort.

  • Cons: Minimal maintenance for a separate package.

  • Plan: A clear 3-step execution strategy.

It turned a vague architectural question into something we could decide.

How It Works

I built this workflow using SpecStory's API and a simple local setup. Claude Code gets tools to query project history directly.

The setup:

  • CLI Tools: Scripts that call list_projects, list_sessions, and get_session from the SpecStory API.

  • Agent Instructions: A CLAUDE.md file that teaches the agent how to use these tools.

The agent fetches context on its own. It sees project history, filters sessions, and reads transcripts to answer my questions.

### **The Setup**
  • Install the SpecStory CLI.

  • Run your AI agent through the CLI using specstory run to sync automatically. Or run your agent normally and use specstory sync when you finish.

Conversations save locally in a .specstory directory and to the cloud.

Beyond Code

Before ending, one more use case I rely on SpecStory for:

Sharing My Work

"Look through the features we shipped this week and write a blog post about them."

SpecStory captures the reasoning behind each feature, which means the output has that context. Nobody cares what you did unless they know why it matters. Most readers won't know why something matters unless you provide that context.

I get better drafts, faster. Because the "why" is already saved.