<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Alessio Leodori</title>
    <description>The latest articles on DEV Community by Alessio Leodori (@alessio_leodori).</description>
    <link>https://dev.to/alessio_leodori</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3845207%2Fc343dee9-443d-46ba-a9aa-ed1b2609e0a5.png</url>
      <title>DEV Community: Alessio Leodori</title>
      <link>https://dev.to/alessio_leodori</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/alessio_leodori"/>
    <language>en</language>
    <item>
      <title>Your shell history is missing the most important part of AI terminal sessions</title>
      <dc:creator>Alessio Leodori</dc:creator>
      <pubDate>Tue, 31 Mar 2026 15:27:18 +0000</pubDate>
      <link>https://dev.to/alessio_leodori/your-shell-history-is-missing-the-most-important-part-of-ai-terminal-sessions-pgg</link>
      <guid>https://dev.to/alessio_leodori/your-shell-history-is-missing-the-most-important-part-of-ai-terminal-sessions-pgg</guid>
      <description>&lt;p&gt;Shell history breaks the moment you start working with AI agents in the terminal.&lt;/p&gt;

&lt;p&gt;Not because it is slow.&lt;/p&gt;

&lt;p&gt;Not because it is ugly.&lt;/p&gt;

&lt;p&gt;Because the most important data is simply missing.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem with shell history
&lt;/h2&gt;

&lt;p&gt;Your shell history only shows the commands you typed yourself.&lt;/p&gt;

&lt;p&gt;That means you see:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;your manual commands
&lt;/li&gt;
&lt;li&gt;your own navigation
&lt;/li&gt;
&lt;li&gt;your own retries
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But you do &lt;strong&gt;not&lt;/strong&gt; see:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the commands the agent ran
&lt;/li&gt;
&lt;li&gt;the subprocesses it spawned
&lt;/li&gt;
&lt;li&gt;the sequence of actions it took inside the session
&lt;/li&gt;
&lt;li&gt;the terminal output it saw while making decisions
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So after an AI-assisted session, your history gives you a partial story.&lt;/p&gt;

&lt;p&gt;And partial stories are terrible for debugging.&lt;/p&gt;

&lt;h2&gt;
  
  
  A concrete example
&lt;/h2&gt;

&lt;p&gt;Imagine you used Codex CLI, Claude Code, or another agent in your repo.&lt;/p&gt;

&lt;p&gt;Later, something is wrong:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a branch changed
&lt;/li&gt;
&lt;li&gt;a file was rewritten
&lt;/li&gt;
&lt;li&gt;a test was run
&lt;/li&gt;
&lt;li&gt;a commit appeared
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You open shell history to understand what happened.&lt;/p&gt;

&lt;p&gt;And what do you get?&lt;/p&gt;

&lt;p&gt;Only the commands &lt;strong&gt;you&lt;/strong&gt; typed manually.&lt;/p&gt;

&lt;p&gt;The agent activity that actually shaped the session is missing.&lt;/p&gt;

&lt;p&gt;So you end up in a bad spot:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;you know something happened
&lt;/li&gt;
&lt;li&gt;you know the agent did work
&lt;/li&gt;
&lt;li&gt;but the default terminal tools do not show you the data you need
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is the real gap.&lt;/p&gt;

&lt;h2&gt;
  
  
  The issue is visibility into agent-produced session data
&lt;/h2&gt;

&lt;p&gt;Traditional shell history was never designed to answer questions like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What exactly did the agent run?
&lt;/li&gt;
&lt;li&gt;What output did it see before taking the next step?
&lt;/li&gt;
&lt;li&gt;What happened between the two manual commands I remember typing?
&lt;/li&gt;
&lt;li&gt;What state was the repo in at that exact moment?
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the data is not recorded, you cannot inspect it later.&lt;/p&gt;

&lt;p&gt;And that is exactly what happens with most terminal setups today.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I built instead: Agensic Replay
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Agensic Replay&lt;/strong&gt; is built around a different assumption:&lt;/p&gt;

&lt;p&gt;👉 if an agent can act in your terminal, the session itself needs to be recorded and replayable&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9nynmgrt17s9o3a2t0d7.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9nynmgrt17s9o3a2t0d7.gif" alt="Agensic Replay" width="720" height="395"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Instead of relying on shell history, &lt;strong&gt;Agensic&lt;/strong&gt; tracks the session as a real timeline.&lt;/p&gt;

&lt;p&gt;That lets you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;replay terminal sessions
&lt;/li&gt;
&lt;li&gt;browse event timelines
&lt;/li&gt;
&lt;li&gt;inspect what happened step by step
&lt;/li&gt;
&lt;li&gt;export the session dataset to JSON or CSV
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So instead of asking shell history for information it never captured:&lt;/p&gt;

&lt;p&gt;👉 you can inspect the actual session&lt;/p&gt;

&lt;h2&gt;
  
  
  Why replay matters
&lt;/h2&gt;

&lt;p&gt;This changes the debugging workflow completely.&lt;/p&gt;

&lt;p&gt;Without replay, investigating an agent session usually turns into:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;scrolling history
&lt;/li&gt;
&lt;li&gt;guessing what the agent probably ran
&lt;/li&gt;
&lt;li&gt;checking git status
&lt;/li&gt;
&lt;li&gt;digging through reflog
&lt;/li&gt;
&lt;li&gt;trying to reconstruct events from incomplete evidence
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With replay, you do not need to guess.&lt;/p&gt;

&lt;p&gt;You can open the session and see how it unfolded.. The actual tracked session.&lt;/p&gt;

&lt;h2&gt;
  
  
  Replay is useful because the missing data is now present
&lt;/h2&gt;

&lt;p&gt;That is the key point.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Agensic Replay&lt;/strong&gt; exists because shell history is missing the crucial data in the first place.&lt;/p&gt;

&lt;p&gt;Replay works because &lt;strong&gt;Agensic&lt;/strong&gt; records:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the terminal session
&lt;/li&gt;
&lt;li&gt;the event timeline
&lt;/li&gt;
&lt;li&gt;the agent-driven activity
&lt;/li&gt;
&lt;li&gt;the repo checkpoints tied to the session
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once that data exists, you can finally answer the questions that normal shell tooling cannot answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Then came the most useful part: Git Time Travel
&lt;/h2&gt;

&lt;p&gt;Once sessions were replayable, the next obvious problem was recovery.&lt;/p&gt;

&lt;p&gt;Because understanding what happened is great.&lt;/p&gt;

&lt;p&gt;But often you also want to go back to a precise moment and inspect safely.&lt;/p&gt;

&lt;p&gt;So &lt;strong&gt;Agensic&lt;/strong&gt; adds Time Travel on top of Replay.&lt;/p&gt;

&lt;p&gt;That means you can jump back to the exact Git state captured at a specific session checkpoint.&lt;/p&gt;

&lt;p&gt;Not roughly the right point.&lt;/p&gt;

&lt;p&gt;Not “somewhere before the bad commit.”&lt;/p&gt;

&lt;p&gt;👉 the exact repo state tied to that session moment&lt;/p&gt;

&lt;p&gt;And it restores that state into a new branch, so you can investigate without destroying your current working tree.&lt;/p&gt;

&lt;p&gt;What started as a session visibility problem became a more complete workflow:&lt;/p&gt;

&lt;p&gt;replay → see the session data shell history never captured&lt;br&gt;&lt;br&gt;
timeline → inspect the sequence of events&lt;br&gt;&lt;br&gt;
time travel → restore the exact repo state from a checkpoint&lt;br&gt;&lt;br&gt;
export → keep evidence for incident review or debugging  &lt;/p&gt;

&lt;p&gt;Because with AI agents, the bottleneck is no longer just execution.&lt;/p&gt;

&lt;p&gt;It is whether the session remains inspectable after the fact.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final thoughts
&lt;/h2&gt;

&lt;p&gt;If you use AI agents in the terminal, shell history is no longer enough.&lt;/p&gt;

&lt;p&gt;Not because history is old.&lt;/p&gt;

&lt;p&gt;Because it only records the human-visible slice of the session.&lt;/p&gt;

&lt;p&gt;The agent can generate a lot of important activity, and by default that data just disappears from view.&lt;/p&gt;

&lt;p&gt;That is the problem &lt;strong&gt;Agensic&lt;/strong&gt; is trying to solve.&lt;/p&gt;

&lt;h2&gt;
  
  
  If you’re curious
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Agensic&lt;/strong&gt; is open source here:&lt;br&gt;&lt;br&gt;
👉 &lt;a href="https://github.com/Alex188dot/agensic" rel="noopener noreferrer"&gt;https://github.com/Alex188dot/agensic&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you are using AI agents in the terminal, I would especially love feedback on the replay and time-travel workflow!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>cli</category>
      <category>git</category>
    </item>
    <item>
      <title>Why terminal autocomplete is still terrible (and what I built instead)</title>
      <dc:creator>Alessio Leodori</dc:creator>
      <pubDate>Thu, 26 Mar 2026 19:41:59 +0000</pubDate>
      <link>https://dev.to/alessio_leodori/why-terminal-autocomplete-is-still-terrible-and-what-i-built-instead-4598</link>
      <guid>https://dev.to/alessio_leodori/why-terminal-autocomplete-is-still-terrible-and-what-i-built-instead-4598</guid>
      <description>&lt;p&gt;Terminal autocomplete hasn’t really evolved.&lt;/p&gt;

&lt;p&gt;It’s still:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;prefix-based&lt;/li&gt;
&lt;li&gt;fragile to typos&lt;/li&gt;
&lt;li&gt;unaware of how you actually work&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s fast, sure. But it’s not &lt;em&gt;helpful&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem with terminal autocomplete
&lt;/h2&gt;

&lt;p&gt;Most shells do one thing well:&lt;/p&gt;

&lt;p&gt;👉 complete what you already started typing&lt;/p&gt;

&lt;p&gt;That’s it.&lt;/p&gt;

&lt;p&gt;If you type:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dokcer logs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You get nothing.&lt;/p&gt;

&lt;p&gt;If you type:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker rec
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You also get nothing.&lt;/p&gt;

&lt;p&gt;Even though:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;you meant &lt;code&gt;docker&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;you probably ran &lt;code&gt;docker logs&lt;/code&gt; 100 times before&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The shell doesn’t care.&lt;/p&gt;

&lt;p&gt;It doesn’t learn.&lt;br&gt;
It doesn’t adapt.&lt;br&gt;
It just matches prefixes.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I wanted instead
&lt;/h2&gt;

&lt;p&gt;I wanted something that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;learns from my actual command history&lt;/li&gt;
&lt;li&gt;fixes typos automatically&lt;/li&gt;
&lt;li&gt;understands intent, not just prefixes&lt;/li&gt;
&lt;li&gt;stays instant (no lag while typing)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So I built a different kind of autocomplete.&lt;/p&gt;

&lt;h2&gt;
  
  
  A better autocomplete (Agensic Autocomplete)
&lt;/h2&gt;

&lt;p&gt;Instead of treating commands as static strings, I treat them as patterns.&lt;/p&gt;

&lt;p&gt;That enables things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;dokcer&lt;/code&gt; → &lt;code&gt;docker&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;docker records&lt;/code&gt; → &lt;code&gt;docker logs&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And importantly:&lt;/p&gt;

&lt;p&gt;👉 it stays local-first and fast&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz9n6x73o6vvtddd8s5qb.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz9n6x73o6vvtddd8s5qb.gif" alt="agensic autocomplete" width="800" height="573"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;AI is only used as a fallback when your history isn’t enough.&lt;/p&gt;

&lt;p&gt;Most of the time, suggestions come from:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;your own repo-aware past commands, ranked on usage&lt;/li&gt;
&lt;li&gt;semantic matching&lt;/li&gt;
&lt;li&gt;typo correction&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It feels closer to an IDE than a shell.&lt;/p&gt;

&lt;h2&gt;
  
  
  But autocomplete wasn’t the real problem
&lt;/h2&gt;

&lt;p&gt;Once I started using AI agents in the terminal (Codex CLI, Claude Code, etc...), I realized something else:&lt;/p&gt;

&lt;p&gt;Autocomplete helps you write commands.&lt;/p&gt;

&lt;p&gt;But it doesn’t help you understand what &lt;em&gt;actually happened&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The missing layer: command provenance (Agensic Provenance)
&lt;/h2&gt;

&lt;p&gt;When an agent runs commands for you, things get blurry fast.&lt;/p&gt;

&lt;p&gt;Shell history doesn’t track commands ran by agents, it's as if they are acting in a black box.&lt;/p&gt;

&lt;p&gt;So I added a &lt;strong&gt;provenance layer&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Every command gets classified and tracked:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;HUMAN_TYPED&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;AI_SUGGESTED_HUMAN_RAN&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;AI_EXECUTED&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And for agent-executed commands, there’s &lt;strong&gt;cryptographic proof&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;So instead of guessing:&lt;/p&gt;

&lt;p&gt;👉 you get a clear, auditable timeline of what actually ran and why&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fazk4pzttwqqs5cio11a2.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fazk4pzttwqqs5cio11a2.gif" alt="agensic provenance" width="760" height="417"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Then came sessions (Agensic Sessions)
&lt;/h2&gt;

&lt;p&gt;The next problem showed up quickly:&lt;/p&gt;

&lt;p&gt;Even if you know what ran…&lt;/p&gt;

&lt;p&gt;👉 you still can’t easily reconstruct the full session&lt;/p&gt;

&lt;p&gt;So I added &lt;strong&gt;session tracking&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Now you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;replay entire terminal sessions&lt;/li&gt;
&lt;li&gt;inspect command timelines&lt;/li&gt;
&lt;li&gt;export runs for debugging or incident review&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcdvzi65saitdppvudc96.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcdvzi65saitdppvudc96.gif" alt="agensic sessions" width="720" height="395"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And the most useful feature:&lt;/p&gt;

&lt;h3&gt;
  
  
  Time travel for your repo
&lt;/h3&gt;

&lt;p&gt;You can jump back to the exact state your repository was in at a specific moment.&lt;/p&gt;

&lt;p&gt;Not “roughly what I remember”&lt;br&gt;
Not “git reflog archaeology”&lt;/p&gt;

&lt;p&gt;👉 the exact state tied to a session checkpoint&lt;/p&gt;

&lt;h2&gt;
  
  
  Putting it together
&lt;/h2&gt;

&lt;p&gt;What started as “better autocomplete” turned into something else:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;autocomplete → helps you write faster&lt;/li&gt;
&lt;li&gt;provenance → helps you understand what happened&lt;/li&gt;
&lt;li&gt;sessions → help you reconstruct and debug&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because once AI agents enter the terminal:&lt;/p&gt;

&lt;p&gt;👉 speed is no longer the bottleneck&lt;br&gt;
👉 understanding is&lt;/p&gt;

&lt;h2&gt;
  
  
  Final thoughts
&lt;/h2&gt;

&lt;p&gt;Terminal tooling hasn’t really caught up with how we work today.&lt;/p&gt;

&lt;p&gt;We’re no longer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;just typing commands&lt;/li&gt;
&lt;li&gt;just running scripts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We’re:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;collaborating with agents&lt;/li&gt;
&lt;li&gt;delegating execution&lt;/li&gt;
&lt;li&gt;moving faster than we can track&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And without visibility, that breaks down quickly.&lt;/p&gt;

&lt;h2&gt;
  
  
  If you’re curious
&lt;/h2&gt;

&lt;p&gt;I open sourced the project here:&lt;br&gt;
👉 &lt;a href="https://github.com/Alex188dot/agensic" rel="noopener noreferrer"&gt;https://github.com/Alex188dot/agensic&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Would love feedback, especially from people using AI agents in the terminal.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>cli</category>
      <category>git</category>
    </item>
  </channel>
</rss>
