<?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: tristan666666</title>
    <description>The latest articles on DEV Community by tristan666666 (@tristan666666).</description>
    <link>https://dev.to/tristan666666</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3991319%2F440d9f0e-48fd-448c-b75c-f755a6fdc7f8.png</url>
      <title>DEV Community: tristan666666</title>
      <link>https://dev.to/tristan666666</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tristan666666"/>
    <language>en</language>
    <item>
      <title>Why Long Claude Code and Codex Runs Stall, and Why I Built a Local Notch Companion</title>
      <dc:creator>tristan666666</dc:creator>
      <pubDate>Fri, 19 Jun 2026 09:11:00 +0000</pubDate>
      <link>https://dev.to/tristan666666/why-long-claude-code-and-codex-runs-stall-and-why-i-built-a-local-notch-companion-1dic</link>
      <guid>https://dev.to/tristan666666/why-long-claude-code-and-codex-runs-stall-and-why-i-built-a-local-notch-companion-1dic</guid>
      <description>&lt;p&gt;Long agent runs fail in a boring way: not with a dramatic crash, but by quietly waiting for the next human action. A Claude Code or Codex session can still be sitting in your terminal, but the useful state has changed from "working" to "your turn", "stalled", or "safe to reset and resume". If you are not watching the terminal, that state change is easy to miss.&lt;/p&gt;

&lt;p&gt;I built Agent Island as a small macOS notch/menu-bar companion for that exact gap. It watches local Claude Code and Codex sessions, shows whether a run is still active or needs attention, and can optionally help resume after a reset window. The important part is that it is local-first and opt-in: it is not trying to bypass provider limits, hide automation, or blindly press continue forever.&lt;/p&gt;

&lt;h2&gt;
  
  
  The actual problem is session state, not speed
&lt;/h2&gt;

&lt;p&gt;When I leave a longer coding agent run going, the terminal is technically still open, but that does not tell me whether useful work is still happening.&lt;/p&gt;

&lt;p&gt;A run can pause because a command finished, the model needs a choice, a tool is waiting for confirmation, or a reset window changed what is safe to do next. "The process still exists" is not the same as "the agent is still making progress".&lt;/p&gt;

&lt;p&gt;The terminal is the source of truth, but it is a poor ambient notification surface. If you are working in another window, walking away for coffee, or checking another task, the important transition can happen quietly.&lt;/p&gt;

&lt;h2&gt;
  
  
  The states that matter
&lt;/h2&gt;

&lt;p&gt;The states I care about are simple:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;running&lt;/strong&gt;: the agent is still producing output or executing useful work&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;your turn&lt;/strong&gt;: the session needs human input&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;stalled&lt;/strong&gt;: the run appears stuck or no longer progressing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;reset-ready&lt;/strong&gt;: enough time has passed that resuming may be reasonable&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once I named those states, the UI became obvious: it should be glanceable, quiet, and close to the place I already look on a Mac.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this belongs on the Mac
&lt;/h2&gt;

&lt;p&gt;For local coding agents, the relevant evidence is local: terminal sessions, transcript files, app state, and user intent. I did not want a cloud dashboard for this. I wanted a small local companion that can tell me what is happening without uploading prompts or workspace content.&lt;/p&gt;

&lt;p&gt;That is why Agent Island lives in the macOS notch/menu-bar area instead of becoming another full dashboard. It is meant to be a status surface, not a new control plane.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why auto-resume must be opt-in
&lt;/h2&gt;

&lt;p&gt;Resume automation is useful, but it is not always safe.&lt;/p&gt;

&lt;p&gt;Blindly continuing every run can waste quota, repeat a bad command, or push a task in the wrong direction. A reset window does not mean every session should continue automatically. The right default is visibility first, automation second.&lt;/p&gt;

&lt;p&gt;So Agent Island treats auto-resume as something explicit. You can use it for sessions you trust, but the product is not a provider-limit bypass and it does not promise to save tokens.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Agent Island does
&lt;/h2&gt;

&lt;p&gt;Agent Island is a small open-source macOS companion for people running longer Claude Code and Codex workflows.&lt;/p&gt;

&lt;p&gt;It currently focuses on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;showing local Claude Code / Codex run state in the notch or menu bar&lt;/li&gt;
&lt;li&gt;surfacing running / your turn / stalled / reset-ready&lt;/li&gt;
&lt;li&gt;optional notifications when attention is needed&lt;/li&gt;
&lt;li&gt;optional resume help for selected long-running sessions&lt;/li&gt;
&lt;li&gt;staying local-first rather than becoming a cloud service&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The launch video is here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/user-attachments/assets/d69b41e0-9298-4f17-b6c9-6014f3bd956b" rel="noopener noreferrer"&gt;https://github.com/user-attachments/assets/d69b41e0-9298-4f17-b6c9-6014f3bd956b&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I learned building it
&lt;/h2&gt;

&lt;p&gt;State detection is messier than checking whether a process is alive. Short pauses are normal. Transcript files can be large. A stale run and a slow run can look similar if you only sample one signal.&lt;/p&gt;

&lt;p&gt;The biggest product lesson was that the best UX here is not a big dashboard. It is a quiet, trustworthy signal that tells you when to come back.&lt;/p&gt;

&lt;h2&gt;
  
  
  Source
&lt;/h2&gt;

&lt;p&gt;The project is open source here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/tristan666666/agent-island" rel="noopener noreferrer"&gt;https://github.com/tristan666666/agent-island&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I would especially like feedback from people who leave Claude Code or Codex running on multi-hour local workflows. How do you currently tell whether a run is still working, waiting for you, or stalled?&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>ai</category>
    </item>
    <item>
      <title>How Agent Island Detects Claude Code and Codex Session State</title>
      <dc:creator>tristan666666</dc:creator>
      <pubDate>Thu, 18 Jun 2026 17:19:00 +0000</pubDate>
      <link>https://dev.to/tristan666666/how-agent-island-detects-claude-code-and-codex-session-state-2p93</link>
      <guid>https://dev.to/tristan666666/how-agent-island-detects-claude-code-and-codex-session-state-2p93</guid>
      <description>&lt;p&gt;I built Agent Island around a small problem that becomes painful during long agentic coding runs: the task does not always fail loudly.&lt;/p&gt;

&lt;p&gt;A Claude Code or Codex session may still be working, may have finished and be waiting for your next instruction, or may have frozen mid-turn. If that happens while you are away from the keyboard, the only visible signal is usually buried in a terminal or transcript file.&lt;/p&gt;

&lt;p&gt;Agent Island turns that into a local macOS signal in the MacBook notch / menu-bar area:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;working&lt;/strong&gt;: the provider logo breathes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;your turn&lt;/strong&gt;: the provider logo spins&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;stalled&lt;/strong&gt;: the provider logo turns red and can play a short beep sequence&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Launch video: &lt;a href="https://github.com/user-attachments/assets/d69b41e0-9298-4f17-b6c9-6014f3bd956b" rel="noopener noreferrer"&gt;https://github.com/user-attachments/assets/d69b41e0-9298-4f17-b6c9-6014f3bd956b&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/tristan666666/agent-island" rel="noopener noreferrer"&gt;https://github.com/tristan666666/agent-island&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Download DMG (macOS 13+): &lt;a href="https://github.com/tristan666666/agent-island/releases/download/v1.0.0/AgentIsland-1.0.0.dmg" rel="noopener noreferrer"&gt;https://github.com/tristan666666/agent-island/releases/download/v1.0.0/AgentIsland-1.0.0.dmg&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The data source is local
&lt;/h2&gt;

&lt;p&gt;There is no shared live-state API for Claude Code and Codex CLI sessions, so Agent Island reads the same local artifacts the tools already write.&lt;/p&gt;

&lt;p&gt;Claude Code activity is detected from JSONL transcript files under:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~/.claude/projects/*.jsonl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The trigger picker uses Claude Desktop's session store for nicer labels and archived filtering:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~/Library/Application Support/Claude/claude-code-sessions/local_*.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Codex activity is detected from recent JSONL sessions under:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~/.codex/sessions/YYYY/MM/DD/*.jsonl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For Codex session labels, Agent Island reads the first &lt;code&gt;session_meta&lt;/code&gt; JSONL event and uses its &lt;code&gt;id&lt;/code&gt; and &lt;code&gt;cwd&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This keeps state detection local. The app does not need a third-party service just to decide whether a session is still moving.&lt;/p&gt;

&lt;h2&gt;
  
  
  The state model
&lt;/h2&gt;

&lt;p&gt;The scanner runs every six seconds and classifies each candidate transcript. File I/O happens off the main actor so the notch UI stays responsive.&lt;/p&gt;

&lt;p&gt;The core inputs are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;transcript modification time&lt;/li&gt;
&lt;li&gt;the last few JSONL events&lt;/li&gt;
&lt;li&gt;whether this app has recently observed the file producing output&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The current thresholds are intentionally conservative:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Signal&lt;/th&gt;
&lt;th&gt;Threshold&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;active window&lt;/td&gt;
&lt;td&gt;18 seconds&lt;/td&gt;
&lt;td&gt;Fresh transcript writes mean the session is working.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;stall after&lt;/td&gt;
&lt;td&gt;300 seconds&lt;/td&gt;
&lt;td&gt;A watched working session that freezes mid-turn for 5 minutes becomes stalled.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;stall cap&lt;/td&gt;
&lt;td&gt;15 minutes&lt;/td&gt;
&lt;td&gt;Past this, the app treats it as idle rather than a live stall.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;needs-you cap&lt;/td&gt;
&lt;td&gt;20 minutes&lt;/td&gt;
&lt;td&gt;A finished turn is only surfaced as "your turn" while it is still fresh.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;attention window&lt;/td&gt;
&lt;td&gt;30 minutes&lt;/td&gt;
&lt;td&gt;Old transcripts are ignored.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;That last point matters. Agent Island only sounds the alarm if it first saw the session working. A transcript that was already old when the app launched should not suddenly become a red alert.&lt;/p&gt;

&lt;h2&gt;
  
  
  Detecting "your turn"
&lt;/h2&gt;

&lt;p&gt;Agent Island tails the last 128 KB of the transcript, capped to 200 lines, so a recent completion marker is unlikely to be pushed out by a burst of tool output.&lt;/p&gt;

&lt;p&gt;For Claude Code, the scanner looks for an assistant event whose stop reason indicates the assistant turn is complete:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;stop_reason: end_turn
stop_reason: stop_sequence
stop_reason: stop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For Codex, the scanner looks for Codex event messages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;payload.type: task_complete
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If a newer &lt;code&gt;task_started&lt;/code&gt; appears before a completion marker, Codex is treated as still working.&lt;/p&gt;

&lt;h2&gt;
  
  
  Detecting stalled sessions
&lt;/h2&gt;

&lt;p&gt;A stalled session is not just "a file did not change for a while." That would be too noisy.&lt;/p&gt;

&lt;p&gt;The scanner only returns stalled when all of these are true:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the transcript was recently observed in the working state&lt;/li&gt;
&lt;li&gt;the transcript has stopped changing for at least five minutes&lt;/li&gt;
&lt;li&gt;no fresh turn-complete marker is visible in the tail&lt;/li&gt;
&lt;li&gt;the session is still inside the 15-minute stall cap&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This catches the failure mode the app cares about: a long-running agent that was active, then froze mid-turn while you were not watching.&lt;/p&gt;

&lt;h2&gt;
  
  
  Aggregating per provider
&lt;/h2&gt;

&lt;p&gt;Claude and Codex can each have multiple candidate transcripts. Agent Island classifies each file, then takes the most urgent state for that provider:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;idle &amp;lt; working &amp;lt; your turn &amp;lt; stalled
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That gives one visible Claude state and one visible Codex state in the notch.&lt;/p&gt;

&lt;h2&gt;
  
  
  Auto-resume is separate from state detection
&lt;/h2&gt;

&lt;p&gt;The visual state monitor is passive. Auto-resume is explicit and opt-in.&lt;/p&gt;

&lt;p&gt;A trigger contains:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;provider: Claude or Codex&lt;/li&gt;
&lt;li&gt;session id&lt;/li&gt;
&lt;li&gt;working directory&lt;/li&gt;
&lt;li&gt;message to send&lt;/li&gt;
&lt;li&gt;trigger mode&lt;/li&gt;
&lt;li&gt;enabled state&lt;/li&gt;
&lt;li&gt;last fired time&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are two trigger modes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;after reset&lt;/strong&gt;: fire once after the provider's real reset boundary advances&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;every N hours&lt;/strong&gt;: fire on a fixed local interval&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The reset-based mode is deliberately not "wait five hours from now." The app watches the provider usage store and treats a changed reset boundary as the reset signal. That prevents relaunches from firing immediately and lets the app catch up once if the Mac slept through a genuine rollover.&lt;/p&gt;

&lt;h2&gt;
  
  
  The risk boundary
&lt;/h2&gt;

&lt;p&gt;When a trigger fires, Agent Island resumes the selected CLI session using the provider's resume command. Those flags are powerful: they bypass normal approval prompts and can spend tokens.&lt;/p&gt;

&lt;p&gt;That is why auto-resume is not the default experience. The app makes it explicit in the README and UI: only attach triggers to sessions you trust.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this belongs in the notch
&lt;/h2&gt;

&lt;p&gt;This is not trying to replace a terminal UI, dashboard, or session browser. Those are useful when you want detail.&lt;/p&gt;

&lt;p&gt;The notch is for a narrower job: a persistent, low-friction signal that answers one question while you work on something else:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Is my agent still moving, waiting for me, or stuck?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is the surface Agent Island optimizes for.&lt;/p&gt;

&lt;p&gt;Feedback is welcome, especially from people who run Claude Code or Codex for long refactors and maintenance tasks.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>swift</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
