Portfolio Project: Agent History (June 2026)

Agent History: CLI Session Reconstructor

A terminal context recovery system that parses AI agent session history to reconstruct active development states, trace branches, and facilitate instant folder jumps upon SSH connection or login.


🧭 Overview & Problem

When juggling multiple client projects, switching environments (e.g. Ubuntu VM for web apps vs. Windows PowerShell 7), or logging back in after a weekend, developers often lose context. Staring at a blank shell prompt asking “Where was I?” represents cognitive drag.

Since modern agentic workflows (like pair-programming with the Antigravity CLI) leave detailed local traces, Agent History parses these logs to automatically display a tidy chronological list of your recent projects and lets you jump back into them in one stroke.


🛠️ Tech Stack & Architecture

Component Technology Role
Log Parser Shell Script (ag-recent) Reads and parses local agent logs (~/.gemini/)
Sync Engine chezmoi Keeps shell scripts and aliases unified across environments
AI CLI Engine Antigravity CLI (Gemini 3.5) Generates session logs and directory history
Shell Integration Zsh & .zshrc SSH greeting hook and interactive jumper commands

✨ Core Features

  • SSH Greeting Hook: Automatically outputs recent project directories on login if $SSH_CONNECTION is detected.
  • Automatic Noise Filtering: Prunes deleted folders, root home directories, and system paths.
  • Git Integration: Detects and displays the active git branch name alongside the directory path.
  • Interactive Jumper: Run ag-recent <num> to immediately cd into that workspace directory.
  • Relative Timestamps: Displays relative time markers (e.g. 23h ago, 2d ago) for clean readability.

💻 CLI Output Demo

⚡ Recent Antigravity Projects

1. ~/dev/scratch/wp (23h ago)
2. ~/dev/scratch/threads-reader (main) (23h ago)
3. ~/dev/yaml/pyyaml (dos-in-merge-key) (1d ago)
4. ~/dev/scratch/gsig_app (bookstore-app) (2d ago)
5. ~/dev/packablock (main) (4d ago)

💡 Run ag-recent <num> to jump to a project folder.

🔗 Related Updates & Narrative Logs

The following list shows all narrative blog posts, journals, and updates related to the development and exploration of the Agent History project, dynamically pulled via tag:

  • Where Was I? Recovering Terminal Context with Gemini 3.5

    I work on a few different projects each week. Because of that, my setup is split. I use two distinct environments: a PowerShell 7 console for Windows tasks, and a dedicated Ubuntu VM for web applications. Every time I open a terminal—especially after a weekend or when switching context between clients—I have to play detective.…

    Read More

Leave a Reply

Discover more from Aaron Bronow

Subscribe now to keep reading and get access to the full archive.

Continue reading