<?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: OnamSharma</title>
    <description>The latest articles on DEV Community by OnamSharma (@onamsharma).</description>
    <link>https://dev.to/onamsharma</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%2F4023913%2Ffbc6abc7-6ce3-45cd-b883-aa17ddf284e8.jpg</url>
      <title>DEV Community: OnamSharma</title>
      <link>https://dev.to/onamsharma</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/onamsharma"/>
    <language>en</language>
    <item>
      <title>Claude Supervisor: wait out Claude Code usage limits, then auto-resume</title>
      <dc:creator>OnamSharma</dc:creator>
      <pubDate>Mon, 13 Jul 2026 08:35:53 +0000</pubDate>
      <link>https://dev.to/onamsharma/claude-supervisor-wait-out-claude-code-usage-limits-then-auto-resume-4olf</link>
      <guid>https://dev.to/onamsharma/claude-supervisor-wait-out-claude-code-usage-limits-then-auto-resume-4olf</guid>
      <description>&lt;p&gt;If you use &lt;a href="https://claude.com/claude-code" rel="noopener noreferrer"&gt;Claude Code&lt;/a&gt; for long, agentic tasks,&lt;br&gt;
you know the moment: you're mid-refactor, the agent is cooking, and then — usage&lt;br&gt;
limit. It stops. You come back an hour or two later, the reset has passed, and&lt;br&gt;
you manually pick up where you left off.&lt;/p&gt;

&lt;p&gt;I wanted to just… walk away and have it resume itself. So I built&lt;br&gt;
&lt;strong&gt;&lt;a href="https://github.com/OnamSharma/claude-supervisor" rel="noopener noreferrer"&gt;Claude Supervisor&lt;/a&gt;&lt;/strong&gt; — a&lt;br&gt;
small, human-in-control companion that watches a Claude Code session, waits for&lt;br&gt;
the &lt;em&gt;legitimate&lt;/em&gt; usage-limit reset, resumes, optionally answers the repetitive&lt;br&gt;
permission prompts, and stops the moment the task is done.&lt;/p&gt;

&lt;p&gt;Important framing up front: it is &lt;strong&gt;not a bypass&lt;/strong&gt;. It never touches&lt;br&gt;
authentication, subscriptions, or rate limits. It &lt;em&gt;waits&lt;/em&gt; for real resets and&lt;br&gt;
respects every limit. That constraint shaped the entire design.&lt;/p&gt;
&lt;h2&gt;
  
  
  What it looks like
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pipx &lt;span class="nb"&gt;install &lt;/span&gt;claude-supervisor
claude-supervisor init
claude-supervisor start &lt;span class="nt"&gt;--task&lt;/span&gt; &lt;span class="s2"&gt;"add type hints across the package"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Walk away. It runs the task, and if you hit a limit it waits out the reset and&lt;br&gt;
continues. When you're back:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ claude-supervisor status
 total_sessions   5
 resumes          4
 hours_saved      20.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It even tracks "hours saved" — the unattended waiting it did on your behalf.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;Claude Supervisor launches the &lt;code&gt;claude&lt;/code&gt; CLI inside a pseudo-terminal (PTY) and&lt;br&gt;
reads its output stream. A small set of regex rules — living in &lt;strong&gt;external&lt;br&gt;
YAML&lt;/strong&gt;, not code — recognize four things: a usage limit, a permission prompt,&lt;br&gt;
task completion, and an unexpected exit. Those events drive an explicit &lt;strong&gt;state&lt;br&gt;
machine&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;STARTING → RUNNING ⇄ WAITING_FOR_PERMISSION
              │
              ├→ WAITING_FOR_RESET → RESUMING → RUNNING
              │
              └→ TASK_COMPLETED → STOPPED
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two design choices I'm happy with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Detection lives in YAML.&lt;/strong&gt; When Claude Code changes its wording, you edit a
rules file (or point at your own) — no code release needed. A compatibility
layer from day one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The safety rule is structural.&lt;/strong&gt; &lt;code&gt;TASK_COMPLETED&lt;/code&gt; has exactly one exit:
&lt;code&gt;STOPPED&lt;/code&gt;. There is no transition back to &lt;code&gt;RUNNING&lt;/code&gt;, so the supervisor &lt;em&gt;cannot&lt;/em&gt;
start new work on its own. It's enforced by the transition table and a test —
not by a comment.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The bugs only a real terminal could find
&lt;/h2&gt;

&lt;p&gt;I built the whole thing test-first with a scripted fake terminal: 180+ tests,&lt;br&gt;
high coverage, all green. Feeling good, I ran it against a &lt;em&gt;real&lt;/em&gt; Windows&lt;br&gt;
pseudo-console for the first time. Two bugs surfaced within minutes that no unit&lt;br&gt;
test had caught:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;ANSI escape sequences.&lt;/strong&gt; A real PTY (and Claude's TUI) interleaves colour&lt;br&gt;
and cursor codes into the stream — &lt;code&gt;\x1b[32m…\x1b[0m&lt;/code&gt;. My patterns matched raw&lt;br&gt;
lines, so coloured output could dodge detection. Fix: strip ANSI before&lt;br&gt;
matching.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Carriage return vs. line feed.&lt;/strong&gt; To answer a prompt I sent &lt;code&gt;"y\n"&lt;/code&gt;. On a&lt;br&gt;
Windows ConPTY, &lt;code&gt;\n&lt;/code&gt; is &lt;em&gt;not&lt;/em&gt; the Enter key — so the child process sat blocked&lt;br&gt;
on input forever and the whole run hung. The Enter key is &lt;code&gt;\r&lt;/code&gt;. One character.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That was the lesson of the project: &lt;strong&gt;a green test suite is necessary, not&lt;br&gt;
sufficient.&lt;/strong&gt; The real terminal is the source of truth. I turned that first real&lt;br&gt;
run into permanent integration tests that spawn an actual subprocess in a PTY.&lt;/p&gt;
&lt;h2&gt;
  
  
  It also lives inside Claude Code
&lt;/h2&gt;

&lt;p&gt;Because the supervising runs from your shell, I surfaced its status &lt;em&gt;inside&lt;/em&gt; the&lt;br&gt;
Claude Code UI two ways: a &lt;strong&gt;status line&lt;/strong&gt; (&lt;code&gt;🛡 3 runs · 1 resume · 2.1h saved&lt;/code&gt;)&lt;br&gt;
and a &lt;code&gt;/supervisor&lt;/code&gt; slash command. Both read the same local SQLite history.&lt;/p&gt;
&lt;h2&gt;
  
  
  Status &amp;amp; try it
&lt;/h2&gt;

&lt;p&gt;It's an early alpha — but a serious one: validated end-to-end against real Claude&lt;br&gt;
Code, CI on Windows + Linux across Python 3.12–3.14, MIT licensed, published on&lt;br&gt;
PyPI.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pipx &lt;span class="nb"&gt;install &lt;/span&gt;claude-supervisor
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/OnamSharma/claude-supervisor" rel="noopener noreferrer"&gt;https://github.com/OnamSharma/claude-supervisor&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;The single most useful thing you can send: a real Claude usage-limit message so
I can sharpen detection. Run with &lt;code&gt;--capture run.txt&lt;/code&gt; and open an issue.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you've ever lost momentum to a usage limit, I'd genuinely love your feedback.&lt;br&gt;
Stars, issues, and "here's what broke for me" all welcome. ⭐&lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>opensource</category>
      <category>cli</category>
    </item>
    <item>
      <title>I built RepoLens: a repo docs, diagrams, security report &amp; AI chat, from one knowledge graph</title>
      <dc:creator>OnamSharma</dc:creator>
      <pubDate>Fri, 10 Jul 2026 10:20:43 +0000</pubDate>
      <link>https://dev.to/onamsharma/i-built-repolens-a-repo-docs-diagrams-security-report-ai-chat-from-one-knowledge-graph-18b7</link>
      <guid>https://dev.to/onamsharma/i-built-repolens-a-repo-docs-diagrams-security-report-ai-chat-from-one-knowledge-graph-18b7</guid>
      <description>&lt;p&gt;I just shipped the first release of &lt;strong&gt;RepoLens&lt;/strong&gt; — a tool that turns any&lt;br&gt;
repository into documentation, diagrams, a dependency map, a security report,&lt;br&gt;
and an AI you can chat with about the code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Try it right now&lt;/strong&gt; (no install):&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
bash
npx @onamsharma/repolens
npx @onamsharma/repolens build     # writes README.md + docs/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>opensource</category>
      <category>ai</category>
      <category>go</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
