<?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: Barada Sahu</title>
    <description>The latest articles on DEV Community by Barada Sahu (@mercurialsolo).</description>
    <link>https://dev.to/mercurialsolo</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%2F3876548%2F9c811ffc-a4eb-4faa-81f7-5b78299a9cc7.jpg</url>
      <title>DEV Community: Barada Sahu</title>
      <link>https://dev.to/mercurialsolo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mercurialsolo"/>
    <language>en</language>
    <item>
      <title>No more switching tabs - manage multiple Claude Code sessions from a single terminal</title>
      <dc:creator>Barada Sahu</dc:creator>
      <pubDate>Mon, 13 Apr 2026 11:45:10 +0000</pubDate>
      <link>https://dev.to/mercurialsolo/no-more-switching-tabs-manage-multiple-claude-code-sessions-from-a-single-terminal-2839</link>
      <guid>https://dev.to/mercurialsolo/no-more-switching-tabs-manage-multiple-claude-code-sessions-from-a-single-terminal-2839</guid>
      <description>&lt;p&gt;I run a lot of Claude Code sessions at the same time. Backend refactor in one   terminal, tests in another, docs in a third, frontend in a fourth. It works great   until it doesn't.&lt;/p&gt;

&lt;p&gt;The problems show up fast:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One session is blocked waiting for permission approval. I don't know which tab.&lt;/li&gt;
&lt;li&gt;One's burning through tokens at $4/hr. I can't see that without switching to it.&lt;/li&gt;
&lt;li&gt;One's idle for 15 minutes&lt;/li&gt;
&lt;li&gt;I'm tab-hunting instead of coding.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Claude Code is great at execution. It's not built to manage all these parallel coding sessions. Built the missing layer&lt;/p&gt;

&lt;h2&gt;
  
  
  claudectl
&lt;/h2&gt;

&lt;p&gt;A terminal dashboard that monitors every running Claude Code session from one pane.&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag_asciinema"&gt;
  
&lt;/div&gt;
&lt;br&gt;
It auto-discovers all running sessions and shows live status, cost, burn rate, CPU   usage, context window percentage, and token counts. No config needed. Just run   &lt;code&gt;claudectl&lt;/code&gt;.

&lt;h2&gt;
  
  
  The problems it solves
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Which session is blocked?&lt;/strong&gt;&lt;br&gt;
Sessions needing approval show as "Needs Input" in magenta. Press &lt;code&gt;y&lt;/code&gt; to approve   without switching terminals.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Which session is burning money?&lt;/strong&gt;&lt;br&gt;
Every session shows a live $/hr burn rate. Set a budget with &lt;code&gt;--budget 5   --kill-on-budget&lt;/code&gt; and it auto-kills sessions that exceed it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Which session is stalled?&lt;/strong&gt;&lt;br&gt;
Status detection uses multiple signals — CPU usage, JSONL conversation events, and   message timestamps — not just one indicator. If CPU is zero but the last event says   "processing," claudectl knows something is wrong.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do I intervene without tab-hunting?&lt;/strong&gt;&lt;br&gt;
Press &lt;code&gt;Tab&lt;/code&gt; to jump to any session's terminal. Press &lt;code&gt;i&lt;/code&gt; to type input. Press &lt;code&gt;d&lt;/code&gt; to   kill. All from the dashboard.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works under the hood
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;claudectl&lt;/code&gt; is read-only. It never modifies Claude Code's files or behavior. It reads:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;~/.claude/sessions/*.json&lt;/code&gt; for session metadata&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;~/.claude/projects/{slug}/*.jsonl&lt;/code&gt; for conversation logs and token usage&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ps&lt;/code&gt; output for CPU and memory per process&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Status inference combines multiple signals rather than relying on any single one:&lt;/p&gt;

&lt;p&gt;waiting_for_task event     → Needs Input&lt;br&gt;
  CPU &amp;gt; 5%                   → Processing (overrides everything)&lt;br&gt;
  stop_reason: end_turn      → Waiting&lt;br&gt;
  Last message &amp;gt; 10 min ago  → Idle&lt;br&gt;
  Process exited             → Finished&lt;/p&gt;

&lt;p&gt;JSONL parsing is incremental — it tracks file offsets so it never rereads the full   log. The binary is ~1MB with sub-50ms startup because it uses native &lt;code&gt;ps&lt;/code&gt; instead of heavier system info crates.&lt;/p&gt;

&lt;h2&gt;
  
  
  Beyond monitoring
&lt;/h2&gt;

&lt;p&gt;A few features that turned out to be more useful than I expected:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Event hooks&lt;/strong&gt; — Run shell commands on session events. I use this to get Slack alerts   when a session needs input:&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
toml
  [hooks.on_needs_input]
  run = "curl -X POST $SLACK_WEBHOOK -d '{\"text\": \"{project} needs approval\"}'"

  [hooks.on_budget_warning]
  run = "say '{project} hit 80% budget'"

  Task orchestration — Define multi-session workflows with dependencies:

  {
    "tasks": [
      { "name": "Add auth", "cwd": "./backend", "prompt": "Add JWT middleware" },
      { "name": "Update tests", "cwd": "./backend", "prompt": "Update API tests",   "depends_on": ["Add auth"] }
    ]
  }

 Highlight reels — Press R on any session to record a supercut of what it did: file   edits, commands run, errors hit. Idle time and noise are stripped. Output is a   shareable GIF.

  Install

  brew install mercurialsolo/tap/claudectl
  # or
  cargo install claudectl

  Works on macOS and Linux. Supports Ghostty, Kitty, tmux, WezTerm, Warp, iTerm2, and   Terminal.app.

What's next

The tool is at v0.9.1 now. The immediate roadmap is Windows/WSL support and expanding   the hooks ecosystem. Longer term, I'm thinking about multi-agent monitoring beyond   just Claude Code.

If you run multiple Claude Code sessions, give it a try. If you have ideas or run into issues, the repo is open:

GitHub: https://github.com/mercurialsolo/claudectl

---
_Built in Rust with ratatui. MIT licensed. The entire project was built with Claude Code._
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>rust</category>
      <category>ai</category>
      <category>cli</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
