<?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: Bargan Constantin</title>
    <description>The latest articles on DEV Community by Bargan Constantin (@bargan).</description>
    <link>https://dev.to/bargan</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%2F3543196%2F9791d07a-3a9b-4467-89ac-f71870243f93.png</url>
      <title>DEV Community: Bargan Constantin</title>
      <link>https://dev.to/bargan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bargan"/>
    <language>en</language>
    <item>
      <title>An AI Agent Says the Tests Passed. Which Commit Did CI Test?</title>
      <dc:creator>Bargan Constantin</dc:creator>
      <pubDate>Thu, 26 Nov 2026 06:56:30 +0000</pubDate>
      <link>https://dev.to/bargan/an-ai-agent-says-the-tests-passed-which-commit-did-ci-test-1l3n</link>
      <guid>https://dev.to/bargan/an-ai-agent-says-the-tests-passed-which-commit-did-ci-test-1l3n</guid>
      <description>&lt;p&gt;An agent says all tests passed. The pull request has a red CI check. Before asking the agent to fix the failure, establish what each result actually tested.&lt;/p&gt;

&lt;h2&gt;
  
  
  Identify the code each run tested
&lt;/h2&gt;

&lt;p&gt;Start with the commit SHA. Record the local checkout and whether it had unstaged changes. Then open the hosted run and record the tested SHA and the event that triggered it. A pull request check may run against a merge result, while a local test runs against your working tree. If those inputs differ, inspect the difference before comparing the results.&lt;/p&gt;

&lt;h2&gt;
  
  
  Identify the checks that actually ran
&lt;/h2&gt;

&lt;p&gt;“All tests passed” needs a scope. Record the command, suite, result and any skips. For a .NET change, a fast unit-test run is useful evidence about the selected tests. An integration job may exercise a database, configuration or runtime the local run never touched.&lt;/p&gt;

&lt;p&gt;For example, suppose a local suite tests duplicate-payment handling with a mock repository, and CI runs integration tests against a real database. If CI fails, start with its failing assertion and database setup. The local pass and the hosted failure can both be accurate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep three decisions separate
&lt;/h2&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5kts273x6vyx2vbgvpfu.png" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5kts273x6vyx2vbgvpfu.png" alt="Diagram separating agent output, CI evidence, and ticket status" width="799" height="451"&gt;&lt;/a&gt;&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;Evidence it provides&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Agent summary&lt;/td&gt;
&lt;td&gt;What the agent says it changed and verified.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CI run&lt;/td&gt;
&lt;td&gt;Which checks ran against an identified revision and what they returned.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ticket or review status&lt;/td&gt;
&lt;td&gt;Where the work stands in the team's process.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;When handing off an agent-written change, include the commit, test command, CI link, and any checks still pending. If you rerun after a fix, preserve the original failure and link the new result to the revision it tested. This makes the review reproducible even after the original agent session is gone.&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>cicd</category>
      <category>testing</category>
    </item>
    <item>
      <title>Why Switching an AI Coding Account Is Harder Than Changing a Dropdown</title>
      <dc:creator>Bargan Constantin</dc:creator>
      <pubDate>Thu, 26 Nov 2026 06:47:27 +0000</pubDate>
      <link>https://dev.to/bargan/why-switching-an-ai-coding-account-is-harder-than-changing-a-dropdown-4ge1</link>
      <guid>https://dev.to/bargan/why-switching-an-ai-coding-account-is-harder-than-changing-a-dropdown-4ge1</guid>
      <description>&lt;p&gt;You switch your default coding account from personal to work. One terminal already has an agent running. Another is about to start. Which account will each use?&lt;/p&gt;

&lt;p&gt;The answer depends on where the CLI gets its credentials and when it resolves them. An account picker changes a preference. Whether a live process follows that preference is a separate question.&lt;/p&gt;

&lt;h2&gt;
  
  
  Separate three kinds of state
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;State&lt;/th&gt;
&lt;th&gt;What it tells you&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Default account&lt;/td&gt;
&lt;td&gt;Which identity a new launch is intended to use.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Process credentials&lt;/td&gt;
&lt;td&gt;Which identity the CLI actually uses for requests.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Session history&lt;/td&gt;
&lt;td&gt;Which conversation is displayed or resumed.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Consider a laptop and a development host reached over SSH. You change the default on the laptop while the host still has a session open. The laptop's picker alone tells you nothing about what that remote process will use on its next request. Verify the effective account from the CLI or a provider-supported identity check, separately for the existing process and a fresh launch.&lt;/p&gt;

&lt;h2&gt;
  
  
  An expired login and an exhausted quota need different recovery
&lt;/h2&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fc7s57jvqrle8wi8ev8ty.png" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fc7s57jvqrle8wi8ev8ty.png" alt="Diagram of account selection and credential recovery across devices" width="800" height="469"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A CLI can still be signed in when it has no remaining quota. A credential can also become invalid while a dashboard still shows the last quota reading. If the reading is stale, show when it was taken. If authorization fails, lead the user through the provider's sign-in flow rather than inferring the credential state from the usage bar.&lt;/p&gt;

&lt;p&gt;Separate devices can also take different authentication paths. With independent sign-ins, each device can recover through its own provider flow. If a supported setup shares credentials, test renewal and revocation explicitly, and keep credential values out of logs, screenshots and bug reports.&lt;/p&gt;

&lt;h2&gt;
  
  
  A small test matrix before shipping a switcher
&lt;/h2&gt;

&lt;p&gt;Use test accounts you are authorized to access and record the CLI version and OS.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Start a session with account A. Switch the default to B and launch a second session. Verify both effective identities.&lt;/li&gt;
&lt;li&gt;Repeat with an explicitly selected account on the new launch. Record whether that selection overrides the default.&lt;/li&gt;
&lt;li&gt;Resume the first conversation and verify the identity separately from the conversation ID.&lt;/li&gt;
&lt;li&gt;Test an expired sign-in and an unavailable usage reading. Confirm each gives the user a useful next action.&lt;/li&gt;
&lt;li&gt;Repeat on the SSH host and check that the UI identifies which machine and process each result belongs to.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The product question I would use in review is simple: when someone clicks &lt;strong&gt;Switch account&lt;/strong&gt;, can they tell exactly which session will use the new identity, and when?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>cli</category>
      <category>coding</category>
      <category>terminal</category>
    </item>
    <item>
      <title>I Built a Flight Recorder for Coding Agents. Then I Had to Give It a Keyboard.</title>
      <dc:creator>Bargan Constantin</dc:creator>
      <pubDate>Thu, 26 Nov 2026 06:27:38 +0000</pubDate>
      <link>https://dev.to/bargan/i-built-a-flight-recorder-for-coding-agents-then-i-had-to-give-it-a-keyboard-46c1</link>
      <guid>https://dev.to/bargan/i-built-a-flight-recorder-for-coding-agents-then-i-had-to-give-it-a-keyboard-46c1</guid>
      <description>&lt;p&gt;&lt;em&gt;Research checked: November 26, 2026. This is an engineering case study based on published ccdeck releases, code and guides, not a benchmark or a claim that I reproduced every scenario described here. I build &lt;a href="https://github.com/BarganConstantin/ccdeck" rel="noopener noreferrer"&gt;ccdeck&lt;/a&gt;; that connection is part of this story.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;On November 17, I published &lt;a href="https://dev.to/bargan/claude-code-is-already-an-ai-harness-why-build-a-flight-recorder-2mlm"&gt;a piece about building a flight recorder for coding agents&lt;/a&gt;. The argument was straightforward: once several Claude Code and Codex sessions are running, the hard question is often &lt;em&gt;which one needs me?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The next day, &lt;a href="https://github.com/BarganConstantin/ccdeck/releases/tag/v4.0.0" rel="noopener noreferrer"&gt;ccdeck 4.0.0&lt;/a&gt; shipped terminals inside the dashboard.&lt;/p&gt;

&lt;p&gt;By November 21, Chat could &lt;a href="https://github.com/BarganConstantin/ccdeck/releases/tag/v4.1.0" rel="noopener noreferrer"&gt;answer Claude Code's questions and handle its permission prompts&lt;/a&gt;. On November 22, the board also began observing &lt;a href="https://github.com/BarganConstantin/ccdeck/releases/tag/v4.3.0" rel="noopener noreferrer"&gt;opencode and GitHub Copilot CLI&lt;/a&gt;. And by November 25, Workspace had &lt;a href="https://github.com/BarganConstantin/ccdeck/releases/tag/v4.3.13" rel="noopener noreferrer"&gt;tabs for several sessions within a pane&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;That changed the design question. It's easy to draw a button labelled &lt;strong&gt;Reply&lt;/strong&gt;. It's harder to know where that reply goes, whether the agent received it, and what should happen when the original terminal is gone.&lt;/p&gt;

&lt;h2&gt;
  
  
  A dashboard answers a different question from a workspace
&lt;/h2&gt;

&lt;p&gt;Suppose two agents are editing separate worktrees. One is still running tests. The other has stopped at a permission prompt. A dashboard can show their states without owning either process.&lt;/p&gt;

&lt;p&gt;The moment you try to answer the prompt from that dashboard, observation isn't enough. You need an &lt;em&gt;interactive connection to that exact session&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Those paths need different contracts:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Path&lt;/th&gt;
&lt;th&gt;What it can do&lt;/th&gt;
&lt;th&gt;What can go wrong&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Observation&lt;/td&gt;
&lt;td&gt;Read hooks, rollout logs and session state&lt;/td&gt;
&lt;td&gt;Missing or stale events; a state you cannot infer reliably&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Interaction&lt;/td&gt;
&lt;td&gt;Deliver keyboard input to a running terminal&lt;/td&gt;
&lt;td&gt;Wrong session, dead transport, duplicate send, stale approval&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For Claude Code, ccdeck reads an event stream through hooks; for Codex it also reads the CLI's rollout records. A hook that reports a tool call is &lt;strong&gt;not&lt;/strong&gt; itself a channel for approving or rewriting that call. Interactive Chat in Workspace sends its input through the session's terminal. Those two facts matter more than whether the UI uses cards, tabs or a graph.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lesson 1: "I sent it" is not the same as "the agent took it"
&lt;/h2&gt;

&lt;p&gt;This sounds trivial until a UI has a Send button.&lt;/p&gt;

&lt;p&gt;Imagine writing &lt;em&gt;"Run the integration tests again"&lt;/em&gt; in the dashboard, immediately switching panes, and assuming work has resumed. The terminal connection may have ended. The CLI may be busy, waiting in another mode, or no longer attached to the pane.&lt;/p&gt;

&lt;p&gt;If the interface displays your text as a completed instruction before the session accepts it, you now have two conflicting histories: what you thought you asked and what the agent actually processed.&lt;/p&gt;

&lt;p&gt;In &lt;a href="https://ccdeck.dev/guides/terminal/" rel="noopener noreferrer"&gt;ccdeck's current Workspace Chat&lt;/a&gt;, a message goes through the session's terminal, which must be open in the pane. The UI says &lt;strong&gt;Sending…&lt;/strong&gt; while delivery is uncertain. If the session hasn't taken the message, it offers &lt;strong&gt;Show Term&lt;/strong&gt; rather than claiming the instruction was accepted.&lt;/p&gt;

&lt;p&gt;I like that distinction because it survives a change of model or agent vendor. A useful interactive agent UI needs to expose uncertainty, not hide it behind a spinner.&lt;/p&gt;

&lt;p&gt;The following is a &lt;strong&gt;design sketch&lt;/strong&gt;, not a ccdeck API or a copy of its source:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nc"&gt;Delivery&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
  &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"pending"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;sessionId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"accepted"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;sessionId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"unconfirmed"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;sessionId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;reason&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// A socket write is evidence that bytes were queued.&lt;/span&gt;
&lt;span class="c1"&gt;// It is not, by itself, evidence that the CLI processed a turn.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The useful question in a code review is not "does the send call resolve?" It's "what event makes us say the &lt;em&gt;session&lt;/em&gt; accepted this message?"&lt;/p&gt;

&lt;h2&gt;
  
  
  Lesson 2: approval buttons must mean exactly what the CLI means
&lt;/h2&gt;

&lt;p&gt;Permission requests are even more sensitive than ordinary chat. A green &lt;strong&gt;Approve&lt;/strong&gt; button may look reassuring, but the decision belongs to the CLI's own permission system.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://ccdeck.dev/changelog/" rel="noopener noreferrer"&gt;ccdeck 4.1.0&lt;/a&gt; added cards in Workspace Chat for Claude Code questions, command approvals, edit approvals and plans. Before an answer is sent, the deck checks that &lt;strong&gt;Term still shows the same request&lt;/strong&gt;. Choices that change the session's permission rules, such as &lt;em&gt;don't ask again&lt;/em&gt;, remain in Term.&lt;/p&gt;

&lt;p&gt;That is narrower, and safer, than claiming the dashboard can overrule the agent's security model. It cannot. Nor should it.&lt;/p&gt;

&lt;p&gt;Three things should remain separate:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;What the tool wants to do.&lt;/strong&gt; Display the command, edit or plan in enough context to make a decision.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What the current terminal is actually asking.&lt;/strong&gt; Re-check the prompt at the moment of action; a captured card can become stale.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What the human authorized.&lt;/strong&gt; Send only that choice, and show whether the session took it.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;None of this means a coding agent is safe to run on untrusted code. Sandbox restrictions, repository trust, and human review still matter independently of an attractive Chat UI.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lesson 3: closing a pane isn't ending a process
&lt;/h2&gt;

&lt;p&gt;Terminal apps make this distinction painfully obvious once you add a browser view around them.&lt;/p&gt;

&lt;p&gt;In ccdeck, closing a Workspace pane leaves the underlying session running. An ended session can offer &lt;strong&gt;Reopen here&lt;/strong&gt;, resuming the same conversation in a new terminal. But an agent still running &lt;em&gt;outside&lt;/em&gt; ccdeck may hold that conversation open. In that case, the pane explains where it is still open and offers to reopen when the other session lets go; it doesn't silently start a duplicate conversation.&lt;/p&gt;

&lt;p&gt;Current release notes also describe explicit recovery for moved or disconnected project folders and for a reopen that cannot finish. These are not glamorous changelog entries. They are where interactive developer tools either earn or lose trust.&lt;/p&gt;

&lt;p&gt;The governing rule is simple: &lt;strong&gt;a view is not a process, and a process is not just a conversation ID.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Four CLI names on the board do not mean four identical integrations
&lt;/h2&gt;

&lt;p&gt;This is the part worth stating before anyone tries the product:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;CLI&lt;/th&gt;
&lt;th&gt;Board monitoring&lt;/th&gt;
&lt;th&gt;Workspace terminal + Chat&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Claude Code&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Waiting queue, subagents, question and approval cards&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Codex CLI&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Rollout-derived visibility; no equivalent Claude-style waiting queue from rollout logs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;opencode&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Not offered as the same managed Chat/Term integration&lt;/td&gt;
&lt;td&gt;Working/waiting/done and tool activity on the board&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GitHub Copilot CLI&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Not offered as the same managed Chat/Term integration&lt;/td&gt;
&lt;td&gt;Working/waiting/done and tool activity on the board&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The latter two arrived in &lt;a href="https://github.com/BarganConstantin/ccdeck/releases/tag/v4.3.0" rel="noopener noreferrer"&gt;4.3.0&lt;/a&gt;. Their Chat and spend figures are not at parity with Claude Code and Codex. Treating "supported" as a yes/no flag would be misleading.&lt;/p&gt;

&lt;p&gt;A UI that combines several agents should make its &lt;em&gt;blind spots&lt;/em&gt; obvious. Otherwise a missing signal will be mistaken for a healthy state.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try the interaction boundary, not a benchmark
&lt;/h2&gt;

&lt;p&gt;Here is a small, reproducible walkthrough for &lt;strong&gt;Claude Code or Codex&lt;/strong&gt;. It doesn't require running untrusted code or turning off approvals.&lt;/p&gt;

&lt;p&gt;Start with Node.js 18+ and a locally installed supported CLI. Then run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx ccdeck
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open its local page, normally &lt;code&gt;http://127.0.0.1:4317&lt;/code&gt;, and start a harmless session from Workspace (for example, ask it to explain a file in a test repository). Click that session's card on the Board to open its terminal pane. Switch &lt;strong&gt;Term → Chat&lt;/strong&gt;, send a question, and check the visible delivery state. If you want a second pane, select another session using &lt;strong&gt;Shift+Enter&lt;/strong&gt;; Workspace supports up to four panes. Recent releases also let you keep several sessions as tabs within a pane.&lt;/p&gt;

&lt;p&gt;On Linux and macOS, the &lt;a href="https://ccdeck.dev/guides/terminal/" rel="noopener noreferrer"&gt;terminal guide&lt;/a&gt; lists tmux 3.2+ as a prerequisite; Windows uses a different terminal engine path. Check the guide if your pane cannot attach. A session started in an external terminal may be observable without being immediately controllable from Workspace.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbbj8nln7ep2fyl4gxdly.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbbj8nln7ep2fyl4gxdly.webp" alt="Official ccdeck Workspace demonstration, with generated sessions and sample content, not a screenshot from my test" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Official documentation image, using demo data. The example is illustrative, not measured usage or my personal test result.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A useful manual checklist: did the correct session open? Did the instruction actually arrive? Does closing its pane leave it running? Does a pending approval still match the terminal when you act on it? Can you tell the difference between "waiting" and "not observable"?&lt;/p&gt;

&lt;p&gt;Those checks tell you more about the reliability of an AI workspace than a screenshot with four colorful panes.&lt;/p&gt;

&lt;h2&gt;
  
  
  The awkward product decision
&lt;/h2&gt;

&lt;p&gt;A monitoring tool can be valuable precisely because it cannot change what it observes. Giving it a keyboard adds convenience, but it also adds a responsibility: the interface must never blur observation into authorization.&lt;/p&gt;

&lt;p&gt;For me, the interesting change from ccdeck 3.x to 4.x is not that it gained tabs or another command palette. It's that the dashboard can now take you from &lt;strong&gt;"which session needs attention?"&lt;/strong&gt; to &lt;strong&gt;"am I answering the correct prompt in the correct terminal?"&lt;/strong&gt; without pretending those are the same question.&lt;/p&gt;

&lt;p&gt;If you build interfaces around coding agents, what would you insist on before putting &lt;strong&gt;Approve&lt;/strong&gt; outside the agent's native terminal: a live prompt match, delivery confirmation, a record of the choice, or something else?&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>softwaredevelopment</category>
      <category>tools</category>
    </item>
    <item>
      <title>Codex Can Edit a Repo Without Trusting Its MCP Servers. Here's Why.</title>
      <dc:creator>Bargan Constantin</dc:creator>
      <pubDate>Wed, 25 Nov 2026 06:37:28 +0000</pubDate>
      <link>https://dev.to/bargan/codex-can-edit-a-repo-without-trusting-its-mcp-servers-heres-why-19hh</link>
      <guid>https://dev.to/bargan/codex-can-edit-a-repo-without-trusting-its-mcp-servers-heres-why-19hh</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Checked November 17, 2026.&lt;/strong&gt; This article analyzes the &lt;a href="https://github.com/openai/codex/releases/tag/rust-v0.169.0" rel="noopener noreferrer"&gt;Codex CLI 0.169.0 release&lt;/a&gt; and current OpenAI documentation. It is &lt;strong&gt;not&lt;/strong&gt; a claim that I reproduced the original bug or benchmarked the fix. Commands below are examples to review and run in your own environment.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Imagine a CI job that checks out a pull request and asks an AI agent to review it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;codex &lt;span class="nb"&gt;exec&lt;/span&gt; --sandbox workspace-write \
  &lt;span class="s2"&gt;"Review the current changes and report anything risky."&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The agent is allowed to work inside the checkout. So it must trust the checkout's &lt;code&gt;.codex/config.toml&lt;/code&gt;, right?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;No.&lt;/strong&gt; Those are different permissions, and a &lt;a href="https://github.com/openai/codex/releases/tag/rust-v0.169.0" rel="noopener noreferrer"&gt;November 13 fix in Codex CLI 0.169.0&lt;/a&gt; made the boundary explicit for scripted runs. &lt;code&gt;codex exec&lt;/code&gt; now keeps project configuration and project-defined MCP servers disabled in untrusted directories, even when the command sandbox is &lt;code&gt;workspace-write&lt;/code&gt;. &lt;code&gt;codex exec --trust&lt;/code&gt; and &lt;code&gt;codex review --trust&lt;/code&gt; deliberately save project trust.&lt;/p&gt;

&lt;p&gt;If you run agents on freshly cloned repositories, that distinction matters more than another model picker or terminal UI feature.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three questions hiding behind the word &lt;em&gt;permission&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Here are three questions with different answers:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Question&lt;/th&gt;
&lt;th&gt;Control&lt;/th&gt;
&lt;th&gt;What it decides&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;May the agent write here?&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Sandbox (&lt;code&gt;read-only&lt;/code&gt;, &lt;code&gt;workspace-write&lt;/code&gt;, etc.)&lt;/td&gt;
&lt;td&gt;What model-generated commands can access or change.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;May this repository configure the agent?&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Project trust&lt;/td&gt;
&lt;td&gt;Whether project-scoped &lt;code&gt;.codex/&lt;/code&gt; settings, hooks, rules and MCP definitions are loaded.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Must a person approve this action?&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Approval policy&lt;/td&gt;
&lt;td&gt;When execution pauses for review.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A writable checkout is not evidence that its &lt;em&gt;instructions for running tools&lt;/em&gt; were accepted. Conversely, a trusted checkout does not mean every command is allowed: sandbox and approval settings still apply.&lt;/p&gt;

&lt;p&gt;This isn't a claim that Codex cannot read untrusted source files. Its task may require reading them. The trust gate concerns &lt;strong&gt;project-scoped configuration&lt;/strong&gt;, not every line of repository content. A source file or README can still contain hostile instructions, so ordinary prompt-injection precautions remain necessary.&lt;/p&gt;

&lt;p&gt;See OpenAI's &lt;a href="https://learn.chatgpt.com/docs/agent-approvals-security" rel="noopener noreferrer"&gt;agent security overview&lt;/a&gt; and &lt;a href="https://learn.chatgpt.com/docs/config-file/config-basic" rel="noopener noreferrer"&gt;configuration precedence guide&lt;/a&gt; for the separate controls.&lt;/p&gt;

&lt;h2&gt;
  
  
  The release note people running CI should read
&lt;/h2&gt;

&lt;p&gt;The relevant change is described as a &lt;strong&gt;bug fix&lt;/strong&gt;, not an entirely new security model. The &lt;a href="https://github.com/openai/codex/releases/tag/rust-v0.169.0" rel="noopener noreferrer"&gt;0.169.0 release notes&lt;/a&gt; say non-interactive runs no longer enable project configuration and MCP servers in untrusted directories merely because the sandbox permits workspace writes. The change points to &lt;a href="https://github.com/openai/codex/pull/60041" rel="noopener noreferrer"&gt;PR #60041&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Consider a checkout with these files:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;service/
├── .git/
├── .codex/
│   ├── config.toml
│   └── hooks.json
├── AGENTS.md
└── src/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An untrusted run doesn't load the project &lt;code&gt;.codex/&lt;/code&gt; layers. That includes its project-local config, hooks and rules. But the &lt;strong&gt;user and system&lt;/strong&gt; configuration layers remain separate, and a user-installed MCP server may still be available. "Untrusted project" therefore does &lt;strong&gt;not&lt;/strong&gt; mean "no MCP tools anywhere."&lt;/p&gt;

&lt;p&gt;One more distinction: &lt;code&gt;AGENTS.md&lt;/code&gt; is repository guidance, not the same thing as &lt;code&gt;.codex/config.toml&lt;/code&gt;. Don't assume the &lt;code&gt;.codex/&lt;/code&gt; trust gate makes every repository instruction harmless or invisible.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why MCP changes the consequences
&lt;/h2&gt;

&lt;p&gt;A project-local &lt;code&gt;.codex/config.toml&lt;/code&gt; can define an MCP connection. One form points to a remote HTTP service; another tells the client to launch a local executable over stdio. That latter command is part of the environment you are allowing to start.&lt;/p&gt;

&lt;p&gt;OpenAI's &lt;a href="https://learn.chatgpt.com/docs/enterprise/security-cookbook" rel="noopener noreferrer"&gt;security cookbook&lt;/a&gt; makes an uncomfortable detail explicit: &lt;strong&gt;local stdio MCP processes run outside the local command sandbox.&lt;/strong&gt; An allowlist for the executable and arguments is not, by itself, a constraint on working directory, environment variables or what the process can access.&lt;/p&gt;

&lt;p&gt;So if your team says, "The coding agent is sandboxed, so any MCP process it starts is sandboxed too," you should correct that assumption before building the CI job.&lt;/p&gt;

&lt;p&gt;For a reviewed project, an approved MCP integration may be exactly what the task needs. The problem is granting that capability as an accidental side effect of running a write-capable agent in an unfamiliar directory.&lt;/p&gt;

&lt;h2&gt;
  
  
  A read-only preflight before trusting a checkout
&lt;/h2&gt;

&lt;p&gt;I would start with inspection, not &lt;code&gt;--trust&lt;/code&gt;. Here is a minimal Python 3.11+ script that &lt;strong&gt;reads only&lt;/strong&gt; a repository's Codex configuration. It lists MCP server names and whether they appear to use an HTTP URL or a local launcher. It deliberately does not print commands, arguments or environment values; those may contain secrets.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;pathlib&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nc"&gt;Path&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;sys&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;tomllib&lt;/span&gt;

&lt;span class="n"&gt;repo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;argv&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;argv&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="s2"&gt;"."&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;config&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;repo&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="s2"&gt;".codex"&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="s2"&gt;"config.toml"&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;is_file&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"No project .codex/config.toml"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;SystemExit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"rb"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;stream&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;tomllib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;stream&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;servers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"mcp_servers"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;settings&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;servers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;items&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;kind&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"HTTP"&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="s2"&gt;"url"&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;settings&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="s2"&gt;"stdio"&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="s2"&gt;"command"&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;settings&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="s2"&gt;"unknown"&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"MCP {name}: {kind}"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"Project MCP entries found: {len(servers)}"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The snippet is self-contained and requires no third-party package installation. Its output is &lt;strong&gt;an inventory of declarations&lt;/strong&gt;, not proof that the servers are enabled, safe or actually connected.&lt;/p&gt;

&lt;p&gt;Don't stop at config parsing. Before authorizing project trust, review any project &lt;code&gt;.codex/hooks.json&lt;/code&gt;, inline &lt;code&gt;[hooks]&lt;/code&gt;, executable scripts referred to by hooks, policy rules, and plugin definitions. Then inspect the actual MCP executable, dependency chain, requested credentials, reachable networks, and intended tool permissions. The name &lt;code&gt;internal-docs&lt;/code&gt; proves nothing about what a server does.&lt;/p&gt;

&lt;h2&gt;
  
  
  What &lt;code&gt;--trust&lt;/code&gt; actually changes
&lt;/h2&gt;

&lt;p&gt;For a project you own and have reviewed, Codex documents this explicit form:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;codex &lt;span class="nb"&gt;exec&lt;/span&gt; --trust --sandbox workspace-write \
  &lt;span class="s2"&gt;"Review the current changes and report anything risky."&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Do not run this on an arbitrary PR checkout just to make a missing tool appear.&lt;/strong&gt; &lt;code&gt;--trust&lt;/code&gt; is not a per-command permission prompt. The &lt;a href="https://learn.chatgpt.com/docs/cli/reference" rel="noopener noreferrer"&gt;CLI reference&lt;/a&gt; says it saves project trust for &lt;strong&gt;this and future chats&lt;/strong&gt;, including when the run uses &lt;code&gt;--ephemeral&lt;/code&gt;. It conflicts with &lt;code&gt;--ignore-user-config&lt;/code&gt;. If a project was explicitly marked untrusted, the documentation says to change that setting first.&lt;/p&gt;

&lt;p&gt;This is the most surprising footnote for an automation author: &lt;em&gt;ephemeral conversation state does not make the trust decision ephemeral.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If a pipeline needs an MCP server, a safer design is to review and provision that server as part of the runner's controlled configuration and policy, then test exactly what is active. Don't ask every unreviewed checkout to decide which processes your CI host should launch.&lt;/p&gt;

&lt;p&gt;There is also no universal guarantee that a trusted project can replace all user-level settings. Codex ignores sensitive project-level override keys including provider/auth routing, &lt;code&gt;notify&lt;/code&gt;, and &lt;code&gt;otel&lt;/code&gt; configuration. The &lt;a href="https://learn.chatgpt.com/docs/config-file/config-advanced" rel="noopener noreferrer"&gt;advanced configuration reference&lt;/a&gt; lists them explicitly.&lt;/p&gt;

&lt;h2&gt;
  
  
  A five-minute CI checklist
&lt;/h2&gt;

&lt;p&gt;Before changing a pipeline from an older Codex version, answer these questions with actual runner evidence:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Pin and record the CLI version.&lt;/strong&gt; Use &lt;code&gt;codex --version&lt;/code&gt; in the job log. The behavior discussed here was documented for 0.169.0; recheck later releases before publishing or upgrading.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Separate write access from trust.&lt;/strong&gt; Record the effective sandbox and approval policy. Don't assume &lt;code&gt;workspace-write&lt;/code&gt; also enables &lt;code&gt;.codex/config.toml&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inventory the checkout's &lt;code&gt;.codex/&lt;/code&gt; content.&lt;/strong&gt; Review config, hooks and any executable paths before accepting project trust. The read-only script above helps only with the MCP declarations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inventory globally configured MCP servers too.&lt;/strong&gt; Project trust does not disable the user-level layer. Check the runner's effective server list and tool availability; a &lt;code&gt;codex mcp list&lt;/code&gt; listing by itself is not evidence a tool was used safely.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test one permitted and one denied operation in a disposable environment.&lt;/strong&gt; Compare the CLI's real diagnostics, approval events and external process logs. Don't infer an authorization decision from the model saying "I wasn't allowed."&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If the agent can still complete a task without the project MCP server, a passing job alone will not tell you whether the server was enabled. Put a positive preflight assertion in the pipeline for every dependency you expect to be available.&lt;/p&gt;

&lt;h2&gt;
  
  
  Observing an agent is not authorizing it
&lt;/h2&gt;

&lt;p&gt;I work on &lt;a href="https://github.com/BarganConstantin/ccdeck" rel="noopener noreferrer"&gt;ccdeck&lt;/a&gt;, a local dashboard for Claude Code and Codex sessions. One reason I care about this distinction is that a session timeline can show activity without acting as a permission engine. An observer should never be mistaken for a policy boundary. ccdeck does not grant project trust or approve MCP processes.&lt;/p&gt;

&lt;p&gt;The 0.169.0 fix is a useful reminder of what a trust decision really represents. A sandbox says which commands may operate inside an environment; a trusted project is allowed to contribute configuration to that environment. In CI, an external checkout should not receive the second privilege merely because your build job needed the first.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A question for people running Codex in CI:&lt;/strong&gt; do you configure MCP connections on the runner, or do you let each checked-out repository define them?&lt;/p&gt;

&lt;h3&gt;
  
  
  Sources
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/openai/codex/releases/tag/rust-v0.169.0" rel="noopener noreferrer"&gt;Codex CLI 0.169.0 release notes (November 13, 2026)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/openai/codex/pull/60041" rel="noopener noreferrer"&gt;PR #60041 — Require explicit project trust in non-interactive runs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.chatgpt.com/docs/non-interactive-mode" rel="noopener noreferrer"&gt;Codex non-interactive mode&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.chatgpt.com/docs/config-file/config-advanced" rel="noopener noreferrer"&gt;Codex advanced configuration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.chatgpt.com/docs/cli/reference" rel="noopener noreferrer"&gt;Codex command-line reference&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.chatgpt.com/docs/enterprise/security-cookbook" rel="noopener noreferrer"&gt;Codex security cookbook: MCP identity and sandbox boundary&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>cli</category>
      <category>openai</category>
      <category>security</category>
    </item>
    <item>
      <title>Claude Code Is Already an AI Harness. Why Build a Flight Recorder?</title>
      <dc:creator>Bargan Constantin</dc:creator>
      <pubDate>Tue, 17 Nov 2026 07:42:58 +0000</pubDate>
      <link>https://dev.to/bargan/claude-code-is-already-an-ai-harness-why-build-a-flight-recorder-2mlm</link>
      <guid>https://dev.to/bargan/claude-code-is-already-an-ai-harness-why-build-a-flight-recorder-2mlm</guid>
      <description>&lt;p&gt;A coding agent can say it finished a task. That does not tell you whether the last test passed.&lt;/p&gt;

&lt;p&gt;A log can show that a shell command ran. It cannot, by itself, tell you whether the result is correct. And when a terminal goes quiet, you may be looking at a permission prompt, a long-running tool, or a session that has already finished its turn.&lt;/p&gt;

&lt;p&gt;Those are three different questions. We keep trying to answer them with one scrolling terminal.&lt;/p&gt;

&lt;p&gt;Recently, &lt;a href="https://www.thoughtworks.com/about-us/news/2026/thoughtworks-technology-radar-highlights-stronger-controls" rel="noopener noreferrer"&gt;Thoughtworks' November 2026 Technology Radar&lt;/a&gt; described &lt;em&gt;harness engineering at scale&lt;/em&gt; as one of its themes. A &lt;a href="https://www.reddit.com/r/ClaudeCode/comments/1xxk5ak/what_actually_is_an_ai_harness_and_why_are/" rel="noopener noreferrer"&gt;discussion in r/ClaudeCode&lt;/a&gt; asked a related question: why build an AI harness when Claude Code already exists?&lt;/p&gt;

&lt;p&gt;I think the answer starts by separating three things we often put under the same label.&lt;/p&gt;

&lt;h2&gt;
  
  
  The model, the harness, and the recorder have different jobs
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;model&lt;/strong&gt; produces responses and proposes actions. A &lt;strong&gt;coding harness&lt;/strong&gt; puts those proposals into a working environment: it supplies context, exposes tools, manages turns, enforces permissions, and handles results. Claude Code and Codex CLI already do substantial work here.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;recorder&lt;/strong&gt;, in the sense I mean it, observes events produced by an existing harness. It records what the harness reports and makes that activity inspectable afterward—or while it is happening. It does not need to replace the harness or decide what the agent is allowed to do.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi64wmvykvuy5ettn942r.png" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi64wmvykvuy5ettn942r.png" alt="Diagram: model and coding harness, with Claude events and Codex rollouts flowing into a separate local observer." width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That separation matters. A permissions engine needs authority. A recorder needs evidence. Giving a dashboard authority merely because it watches events creates a second place where tool execution can change.&lt;/p&gt;

&lt;p&gt;There is a precedent in backend engineering: traces and logs help you investigate a request, but a trace is not an HTTP response, and a trace viewer should not silently change authorization decisions. Agent tooling deserves the same distinction.&lt;/p&gt;

&lt;h2&gt;
  
  
  What an event can prove
&lt;/h2&gt;

&lt;p&gt;Suppose an agent is asked to fix a failing API test. You inspect a record of the run and find a test command, a file edit, and a final message saying the bug is fixed.&lt;/p&gt;

&lt;p&gt;You can make several claims about that sequence, but they have different evidentiary strength.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Observation&lt;/th&gt;
&lt;th&gt;What it supports&lt;/th&gt;
&lt;th&gt;What it does &lt;strong&gt;not&lt;/strong&gt; establish&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;A tool-call event was recorded&lt;/td&gt;
&lt;td&gt;The recorder saw a call reported by the harness&lt;/td&gt;
&lt;td&gt;The command achieved its intended result&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A tool result reported success&lt;/td&gt;
&lt;td&gt;The tool returned a success result&lt;/td&gt;
&lt;td&gt;The code change meets the task's acceptance criteria&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A subagent started&lt;/td&gt;
&lt;td&gt;Work was delegated to another agent session&lt;/td&gt;
&lt;td&gt;The delegated work was useful or correct&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;No new events arrived&lt;/td&gt;
&lt;td&gt;The recorder has no newer events&lt;/td&gt;
&lt;td&gt;The process is definitely idle, blocked, or dead&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A turn ended&lt;/td&gt;
&lt;td&gt;The harness reported the end of that turn&lt;/td&gt;
&lt;td&gt;The broader engineering task is finished&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The trap is treating &lt;em&gt;activity&lt;/em&gt;, &lt;em&gt;progress&lt;/em&gt;, and &lt;em&gt;correctness&lt;/em&gt; as interchangeable. They are not.&lt;/p&gt;

&lt;p&gt;To establish correctness, you still need the changed files, relevant tests, a review of the behavior, and sometimes a human decision about the requirements. A recorder tells you where to look; it cannot make that decision for you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two coding CLIs, two different evidence sources
&lt;/h2&gt;

&lt;p&gt;This gets interesting when you try to observe more than one coding tool.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Claude Code&lt;/strong&gt; exposes events through hooks. An observer can receive notifications about session starts, tool use, subagents, turn endings, and other supported events. A well-designed observing hook can forward the event and exit without sending any instruction back to Claude Code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Codex CLI&lt;/strong&gt; stores rollout records on disk. An external tool can follow those files and reconstruct session activity. But a record of something that happened is not the same as a live permission-state signal. In particular, Codex approval requests are not available to the recorder through the rollout data used here.&lt;/p&gt;

&lt;p&gt;These are different interfaces, so a single dashboard should not claim the same confidence for both.&lt;/p&gt;

&lt;p&gt;The data flow can be described without pretending the providers expose identical APIs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Claude Code  -- event hooks ------\
                                  &amp;gt;-- local event processing --&amp;gt; timeline / graph
Codex CLI   -- rollout files ----/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The diagram is an architectural sketch, not a protocol specification. An observer must still handle missing events, delayed writes, restarts, and incomplete session endings. For example, a Codex rollout that lacks a closing event is not proof that its process is still running.&lt;/p&gt;

&lt;p&gt;This is where a useful visual interface can become misleading. A green dot, a timer, or a line connecting two agents looks definitive unless the software can explain how it obtained that state.&lt;/p&gt;

&lt;h2&gt;
  
  
  An evidence model should preserve uncertainty
&lt;/h2&gt;

&lt;p&gt;If I were defining a small event contract for a recorder, I would preserve where each observation came from instead of reducing every source to one generic &lt;code&gt;running: true&lt;/code&gt; flag:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Conceptual example, not ccdeck's actual event schema.&lt;/span&gt;
&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nc"&gt;RecordedEvidence&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;source&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"claude-hook"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="s2"&gt;"codex-rollout"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;sessionId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;observedAt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;eventType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"observed"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="s2"&gt;"inferred"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An &lt;code&gt;observed&lt;/code&gt; value would mean the source reported that event. An &lt;code&gt;inferred&lt;/code&gt; value would mean the observer derived a state from incomplete evidence, such as a missing ending in a file. Neither value would mean &lt;em&gt;verified correct&lt;/em&gt;. The recorder's job is to retain those distinctions all the way to its UI.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I built ccdeck outside the harness
&lt;/h2&gt;

&lt;p&gt;I build &lt;a href="https://ccdeck.dev/" rel="noopener noreferrer"&gt;ccdeck&lt;/a&gt;, a free, open-source local dashboard for Claude Code and Codex CLI. It shows sessions and supported subagents on a canvas, lets you inspect captured tool activity, and surfaces Claude Code sessions waiting for a person to respond.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhamiojqk3n7mbqav86c7.png" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhamiojqk3n7mbqav86c7.png" alt="Official ccdeck interface, rendered with generated sessions and illustrative cost and quota values; not a benchmark." width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Its two capture paths are deliberately separate: a one-way Claude Code hook forwards events to the local server, while a file watcher reads Codex rollouts. The resulting records can be viewed together, even though the underlying signals are not equivalent.&lt;/p&gt;

&lt;p&gt;There is one design choice I care about more than the graph: &lt;strong&gt;the observing hook must not steer the agent&lt;/strong&gt;. ccdeck's Claude Code forwarder posts an event, exits successfully, and writes no decision to stdout. The repository has a test intended to keep that behavior from changing unnoticed. You can &lt;a href="https://github.com/BarganConstantin/ccdeck#how-it-works" rel="noopener noreferrer"&gt;inspect the source and the documented capture paths&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This is a narrow claim. The hook cannot approve, deny, defer, or rewrite a tool call. It does &lt;strong&gt;not&lt;/strong&gt; mean ccdeck is completely read-only: installation adds a hook entry to Claude Code settings, and optional features can change local settings or account state. The README describes those effects.&lt;/p&gt;

&lt;p&gt;And it is not an orchestrator. It does not assign coding tasks or turn a session into a managed workflow. I still start Claude Code or Codex in my terminal, and I still review the output where the work happens.&lt;/p&gt;

&lt;h2&gt;
  
  
  A local recorder also has a privacy boundary
&lt;/h2&gt;

&lt;p&gt;"Runs locally" is useful information, but it is not a complete privacy policy.&lt;/p&gt;

&lt;p&gt;ccdeck keeps session content such as prompts and tool-call details on the machine rather than sending that content in its usage reports. &lt;strong&gt;Usage reports are enabled by default&lt;/strong&gt;, however, and include system metadata, IP address, and a stable hashed device fingerprint. The environment variable &lt;code&gt;AGENTS_DECK_NO_REPORTS=1&lt;/code&gt;, set before the deck starts, disables those reports.&lt;/p&gt;

&lt;p&gt;The product also has local-network discovery enabled by default. Its Browser Watch feature is enabled by default too and examines Chromium history for certain browser-navigation patterns. Those are real access surfaces, even though session content stays local. If you are evaluating a session recorder for sensitive work, review its permissions, default networking behavior, data retention, and uninstall procedure before installing it. The &lt;a href="https://github.com/BarganConstantin/ccdeck#what-it-touches" rel="noopener noreferrer"&gt;"What it touches" documentation&lt;/a&gt; is the relevant starting point.&lt;/p&gt;

&lt;p&gt;A recorder can be useful without being invisible. The honest goal is to make its access explicit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try the distinction on your next run
&lt;/h2&gt;

&lt;p&gt;If you already use Claude Code or Codex CLI, you can inspect one session and ask three questions: Which facts were captured? Which states were inferred? Which conclusions still require checking the code?&lt;/p&gt;

&lt;p&gt;With Node.js 18 or later, start the dashboard:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx ccdeck
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then start your normal &lt;code&gt;claude&lt;/code&gt; or &lt;code&gt;codex&lt;/code&gt; session. The local dashboard normally opens at &lt;code&gt;http://127.0.0.1:4317&lt;/code&gt;; if the port is occupied, use the address printed by the startup command.&lt;/p&gt;

&lt;p&gt;If you prefer the desktop app, the official installers and one-line commands are on &lt;a href="https://ccdeck.dev/" rel="noopener noreferrer"&gt;ccdeck.dev&lt;/a&gt;. For example, the documented macOS installer is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -fsSL https://ccdeck.dev/install.sh &lt;span class="o"&gt;|&lt;/span&gt; sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Read a downloaded script before piping it to a shell if that is your normal security policy. The &lt;a href="https://ccdeck.dev/guides/first-run/" rel="noopener noreferrer"&gt;first-run guide&lt;/a&gt; explains the hook and the reporting defaults. You can stop the Node-based deck with &lt;code&gt;npx ccdeck --stop&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I would test one specific proposition, not whether the dashboard looks nice: &lt;strong&gt;Does its event history help you find evidence faster without pretending to certify the agent's answer?&lt;/strong&gt; That is a useful bar for any agent-observability tool, including mine.&lt;/p&gt;

&lt;p&gt;Claude Code already has a harness. I do not need another runtime to use it. I need to know what the runtime observed, what it could not observe, and exactly where my own review starts.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Sources:&lt;/strong&gt; &lt;a href="https://www.thoughtworks.com/about-us/news/2026/thoughtworks-technology-radar-highlights-stronger-controls" rel="noopener noreferrer"&gt;Thoughtworks Technology Radar, Vol. 35&lt;/a&gt; · &lt;a href="https://www.reddit.com/r/ClaudeCode/comments/1xxk5ak/what_actually_is_an_ai_harness_and_why_are/" rel="noopener noreferrer"&gt;Reddit discussion on AI harnesses&lt;/a&gt; · &lt;a href="https://github.com/BarganConstantin/ccdeck" rel="noopener noreferrer"&gt;ccdeck source and documentation&lt;/a&gt; · &lt;a href="https://ccdeck.dev/guides/first-run/" rel="noopener noreferrer"&gt;ccdeck first-run guide&lt;/a&gt;&lt;/p&gt;

</description>
      <category>claudecode</category>
      <category>ai</category>
      <category>opensource</category>
      <category>devtools</category>
    </item>
    <item>
      <title>Run Claude Code and Codex side by side. Keep track of both.</title>
      <dc:creator>Bargan Constantin</dc:creator>
      <pubDate>Tue, 17 Nov 2026 06:49:05 +0000</pubDate>
      <link>https://dev.to/bargan/run-claude-code-and-codex-side-by-side-keep-track-of-both-3bdd</link>
      <guid>https://dev.to/bargan/run-claude-code-and-codex-side-by-side-keep-track-of-both-3bdd</guid>
      <description>&lt;p&gt;One terminal has Claude Code working on a feature. Another has Codex investigating a failing test. You switch back to your editor, and a few minutes later you need to work out where both tasks stand.&lt;/p&gt;

&lt;p&gt;Opening each terminal works. With several sessions, it becomes a recurring part of the job.&lt;/p&gt;

&lt;p&gt;I build &lt;a href="https://ccdeck.dev/" rel="noopener noreferrer"&gt;ccdeck&lt;/a&gt;, a free, open-source dashboard for Claude Code and Codex CLI. It gives those sessions a shared view while you keep using your existing terminals. Here is a small exercise for deciding whether that view helps your workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with two tasks you already understand
&lt;/h2&gt;

&lt;p&gt;Choose two independent tasks: investigating a test failure and reviewing a separate module, for example. Give each agent a clear stopping point, such as reporting its findings before editing files.&lt;/p&gt;

&lt;p&gt;If both tasks will change the same repository, use separate worktrees. &lt;a href="https://code.claude.com/docs/en/worktrees" rel="noopener noreferrer"&gt;Claude Code documents this workflow&lt;/a&gt;: each session gets a separate working directory and branch. You still need to review and integrate the results.&lt;/p&gt;

&lt;p&gt;For this exercise, leave both agents in the terminals where you normally use them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Add the shared view
&lt;/h2&gt;

&lt;p&gt;With Node.js 18 or newer installed, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx ccdeck
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The startup report prints the local address. It is usually &lt;code&gt;http://127.0.0.1:4317&lt;/code&gt;; use the printed address if that port is occupied. A &lt;a href="https://ccdeck.dev/#download" rel="noopener noreferrer"&gt;desktop app&lt;/a&gt; is also available for macOS, Windows and Linux, without a separate Node.js installation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Before starting:&lt;/strong&gt; ccdeck sends usage reports by default. Session prompts, replies and file contents are not included, but reports include system information, an IP address and a device fingerprint. To disable reports from the first launch, set &lt;code&gt;AGENTS_DECK_NO_REPORTS=1&lt;/code&gt; in the environment that starts ccdeck. The &lt;a href="https://ccdeck.dev/guides/first-run/" rel="noopener noreferrer"&gt;first-run guide&lt;/a&gt; explains the setup and what it changes.&lt;/p&gt;

&lt;p&gt;Start a fresh Claude Code session and a fresh Codex CLI session, then give each its task. Using fresh sessions makes this exercise easier to follow than trying to reconstruct work already in progress.&lt;/p&gt;

&lt;p&gt;Claude Code events arrive through a hook that ccdeck adds to its settings. Codex activity comes from the rollout files its CLI writes. Those are different capture paths, and they have different limits.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use it to answer three questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Which session should I check next?
&lt;/h3&gt;

&lt;p&gt;Look at the session list before opening a terminal. Claude Code sessions waiting on you appear together, with their waiting time. That gives you a place to start when several tasks are in flight.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Codex approval requests are not visible in its rollout files.&lt;/strong&gt; Keep its terminal available: a tool waiting for approval can look like a tool still running. The shared canvas covers both providers; the waiting queue is Claude Code only.&lt;/p&gt;

&lt;h3&gt;
  
  
  What happened inside that task?
&lt;/h3&gt;

&lt;p&gt;Double-click a node to inspect the captured prompt, tool calls, tokens and timing. For Claude Code, spawned subagents have their own nodes. For Codex, child sessions connect to a parent when the rollout explicitly records that relationship.&lt;/p&gt;

&lt;p&gt;Use this view to locate the part of a session you want to inspect. To decide whether a fix works, read the diff and run the relevant checks. A completed tool call is evidence of activity, not proof that the assignment is correct.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is this view saving me a trip through the tabs?
&lt;/h3&gt;

&lt;p&gt;Continue your normal work for one task cycle. When an agent stops, use ccdeck to orient yourself, return to the appropriate terminal, and review its result.&lt;/p&gt;

&lt;p&gt;Then judge the dashboard against something concrete: could you identify the session and its recent activity before scrolling through its terminal? Did the waiting list point you to a Claude Code session you needed to answer?&lt;/p&gt;

&lt;p&gt;That is a more useful trial than opening a dashboard and deciding whether the graph looks impressive.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep it if it earns its space
&lt;/h2&gt;

&lt;p&gt;If you work in one session and already know exactly where it stands, another view may add little. If you alternate between Claude Code and Codex CLI, or regularly leave several sessions working, try the exercise with your next pair of tasks.&lt;/p&gt;

&lt;p&gt;ccdeck is free under AGPL-3.0. It needs no ccdeck account, and your existing agent subscriptions or API access remain separate.&lt;/p&gt;

&lt;p&gt;Closing the terminal does not stop the dashboard. Use &lt;code&gt;npx ccdeck --stop&lt;/code&gt; when you want it off; &lt;code&gt;npx ccdeck --uninstall&lt;/code&gt; removes its integrations. The &lt;a href="https://github.com/BarganConstantin/ccdeck#uninstall" rel="noopener noreferrer"&gt;README&lt;/a&gt; explains the local files that remain and the separate purge option.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://ccdeck.dev/#download" rel="noopener noreferrer"&gt;Try ccdeck&lt;/a&gt;, keep your terminals, and see whether the shared view helps you get back to the right task.&lt;/p&gt;

</description>
      <category>claudecode</category>
      <category>codex</category>
      <category>productivity</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Claude Code Hit Its 5-Hour Limit. Here's What I Built to Handle It.</title>
      <dc:creator>Bargan Constantin</dc:creator>
      <pubDate>Thu, 05 Nov 2026 06:06:57 +0000</pubDate>
      <link>https://dev.to/bargan/claude-code-hit-its-5-hour-limit-heres-what-i-built-to-handle-it-12d6</link>
      <guid>https://dev.to/bargan/claude-code-hit-its-5-hour-limit-heres-what-i-built-to-handle-it-12d6</guid>
      <description>&lt;p&gt;You're halfway through a task. Claude Code has found the relevant files, started changing code, and is finally getting somewhere.&lt;/p&gt;

&lt;p&gt;Then a usage limit interrupts the conversation.&lt;/p&gt;

&lt;p&gt;Maybe the tests haven't passed yet. Maybe the refactor is only half done. Either way, you're suddenly thinking about quota windows and logins instead of the code.&lt;/p&gt;

&lt;p&gt;If you already have multiple accounts you're authorized to use, there's a second problem: &lt;strong&gt;which one is available, and how do you keep track of the session?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That's one of the reasons I build &lt;strong&gt;&lt;a href="https://ccdeck.dev" rel="noopener noreferrer"&gt;ccdeck&lt;/a&gt;&lt;/strong&gt; — a free, open-source dashboard for Claude Code and Codex that keeps account usage and active sessions in one place.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx ccdeck
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It runs locally on macOS, Linux and Windows. You can use it with a single account too.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbrkc4hxl5ighgh7ierc4.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbrkc4hxl5ighgh7ierc4.gif" alt="Animated three-step example: Claude Code usage limit, checking eligible account capacity, then selecting an available account" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Animated explanatory example with fictional quota data. It is not a real CCDeck screen recording, and continuation can require a separate action.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The limit you hit isn't necessarily the limit you expected
&lt;/h2&gt;

&lt;p&gt;Claude has different usage windows, including five-hour and weekly limits for applicable plans. They're separate: headroom in one window doesn't mean the other has room.&lt;/p&gt;

&lt;p&gt;And changing models, effort or task complexity can affect how quickly you use an allowance. A percentage in one plan shouldn't be treated as the same number of tokens in a different plan.&lt;/p&gt;

&lt;p&gt;Before deciding what to do next, I want to know three things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which window is restricting my work?&lt;/li&gt;
&lt;li&gt;When does it reset?&lt;/li&gt;
&lt;li&gt;What capacity is available on accounts I'm permitted to manage?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;CCDeck's &lt;strong&gt;Accounts&lt;/strong&gt; panel shows configured Claude accounts, usage readings, reading freshness, and reset information in the same place.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://ccdeck.dev/guides/claude-accounts/" rel="noopener noreferrer"&gt;See the official CCDeck Claude accounts guide&lt;/a&gt;&lt;/strong&gt; for the actual interface and current controls.&lt;/p&gt;

&lt;h2&gt;
  
  
  Switching accounts should not become another debugging task
&lt;/h2&gt;

&lt;p&gt;You can select an account manually. If you prefer, CCDeck also integrates with &lt;strong&gt;claude-swap&lt;/strong&gt; to offer optional Auto-switch for Claude Code.&lt;/p&gt;

&lt;p&gt;It's &lt;strong&gt;off by default&lt;/strong&gt;. When enabled, it evaluates the active account against your selected usage threshold — 90% by default — and can select another eligible account according to the configured rules.&lt;/p&gt;

&lt;p&gt;There are useful choices beyond simply picking the first account in a list:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Most room left&lt;/strong&gt;, when you want an eligible account with more reported capacity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Soonest weekly reset&lt;/strong&gt;, when the reset order matters to you.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Home account&lt;/strong&gt;, so you can favor a preferred login.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hold out of rotation&lt;/strong&gt;, to exclude an account from automatic selection.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That last control is important if you keep work and personal accounts separate or your organization restricts which credentials may be used.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fiwvh4u56fdhgjc4qmvg8.png" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fiwvh4u56fdhgjc4qmvg8.png" alt="Illustrated account selection flow with example usage readings" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Illustrative account-selection flow, not recorded CCDeck behavior.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One boundary worth being clear about:&lt;/strong&gt; CCDeck does not bypass Claude's five-hour limit or pool allowances. Each account retains the capacity and restrictions assigned by its provider. Only use accounts and switching workflows you're authorized to use under the applicable terms.&lt;/p&gt;

&lt;h2&gt;
  
  
  Does switching restart my Claude Code session?
&lt;/h2&gt;

&lt;p&gt;Not by itself.&lt;/p&gt;

&lt;p&gt;Claude Code uses a shared active login. Changing that login doesn't restart existing sessions; they can pick it up on a later message. On macOS, the login change can take roughly 30 seconds to reach an existing session.&lt;/p&gt;

&lt;p&gt;If a session has &lt;em&gt;already stopped&lt;/em&gt; with a usage-limit error, you may need to type &lt;code&gt;continue&lt;/code&gt; after an eligible login becomes active. CCDeck also offers a Continue action for supported background sessions and an opt-in continuation setting for certain qualifying stops.&lt;/p&gt;

&lt;p&gt;So there are two separate steps: &lt;strong&gt;switch the active login&lt;/strong&gt; and &lt;strong&gt;resume the stopped conversation if necessary&lt;/strong&gt;. I would rather document the difference than promise a seamless handoff that doesn't exist for every launch path.&lt;/p&gt;

&lt;h2&gt;
  
  
  Codex works differently
&lt;/h2&gt;

&lt;p&gt;CCDeck also manages isolated Codex profiles, with separate logins, quota information, and a persistent default.&lt;/p&gt;

&lt;p&gt;For &lt;strong&gt;supported CCDeck-managed terminal sessions&lt;/strong&gt;, enabling Codex Auto-switch can allow a usage-limit failure to trigger a handoff to an eligible profile, restore the saved conversation and submit one continuation.&lt;/p&gt;

&lt;p&gt;That's not universal support for every IDE, daemon, or terminal. The automatic terminal path has transport and configuration requirements, and was verified with Codex CLI 0.166.0. Interactive native handoff testing described in the 3.80.0 README was performed on macOS; native Windows/Linux TUI behavior still needs separate acceptance testing.&lt;/p&gt;

&lt;p&gt;The current &lt;a href="https://github.com/BarganConstantin/ccdeck#accounts" rel="noopener noreferrer"&gt;README&lt;/a&gt; explains those limits in detail.&lt;/p&gt;

&lt;h2&gt;
  
  
  I also wanted to know which agent was waiting
&lt;/h2&gt;

&lt;p&gt;Quota isn't the only reason an agent stops making progress.&lt;/p&gt;

&lt;p&gt;Sometimes Claude Code is waiting for a permission prompt. Sometimes it finished a turn in another tab. Sometimes a subagent is still busy while the parent looks idle.&lt;/p&gt;

&lt;p&gt;CCDeck brings Claude Code and Codex sessions into one dashboard with tool activity, token usage, and session state. Claude Code sessions waiting for input get surfaced together so you don't have to scan every terminal tab.&lt;/p&gt;

&lt;p&gt;That was the original problem I built the dashboard around. Account management belongs next to it because usage interruptions happen in those same sessions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install it your way
&lt;/h2&gt;

&lt;p&gt;Choose the desktop app or run ccdeck through Node.js.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;macOS desktop app — Terminal:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://ccdeck.dev/install.sh | sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Windows desktop app — PowerShell:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;irm&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;https://ccdeck.dev/install.ps1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;iex&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Node.js / npx:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx ccdeck
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For downloadable installers, including Linux, use &lt;a href="https://ccdeck.dev/#download" rel="noopener noreferrer"&gt;Get ccdeck&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Open &lt;strong&gt;Accounts&lt;/strong&gt; to inspect usage and configure selection if your setup permits it. Or use &lt;code&gt;ccdeck tui&lt;/code&gt; to inspect Claude accounts and sessions from a terminal.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://github.com/BarganConstantin/ccdeck" rel="noopener noreferrer"&gt;CCDeck on GitHub&lt;/a&gt;&lt;/strong&gt; — source, features, limitations and issues.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://ccdeck.dev" rel="noopener noreferrer"&gt;CCDeck website&lt;/a&gt;&lt;/strong&gt; — installation and guides.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's free and open source under AGPL-3.0.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do you handle usage interruptions?
&lt;/h3&gt;

&lt;p&gt;When an agent stops in the middle of a task, what do you usually do — wait for the reset, switch to another authorized workflow, change models, or something else?&lt;/p&gt;

&lt;p&gt;I'm particularly curious about &lt;strong&gt;what happens to your conversation context&lt;/strong&gt; after the interruption. That's the part I'm trying to make less annoying.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Further reading: &lt;a href="https://github.com/BarganConstantin/ccdeck" rel="noopener noreferrer"&gt;CCDeck README&lt;/a&gt;, &lt;a href="https://ccdeck.dev/guides/claude-accounts/" rel="noopener noreferrer"&gt;CCDeck account guide&lt;/a&gt;, &lt;a href="https://support.claude.com/en/articles/11647753-how-do-usage-and-length-limits-work" rel="noopener noreferrer"&gt;Anthropic usage docs&lt;/a&gt;, &lt;a href="https://help.openai.com/en/articles/11369540-using-codex-with-your-chatgpt-plan" rel="noopener noreferrer"&gt;OpenAI Codex plan guidance&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>claudecode</category>
      <category>codex</category>
      <category>opensource</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Your agent's slowest tool call may be waiting for you</title>
      <dc:creator>Bargan Constantin</dc:creator>
      <pubDate>Tue, 03 Nov 2026 13:56:30 +0000</pubDate>
      <link>https://dev.to/bargan/your-agents-slowest-tool-call-may-be-waiting-for-you-4lcn</link>
      <guid>https://dev.to/bargan/your-agents-slowest-tool-call-may-be-waiting-for-you-4lcn</guid>
      <description>&lt;p&gt;An agent takes twelve minutes to finish a task. The tool report shows twenty minutes of activity. One test command took three minutes, although the same command normally finishes in seconds.&lt;/p&gt;

&lt;p&gt;Before changing the model or the test runner, check what the timer includes.&lt;/p&gt;

&lt;p&gt;A duration needs a start, an end and a scope. Without those, “slowest tool” is an ambiguous label.&lt;/p&gt;

&lt;h2&gt;
  
  
  Separate elapsed time from accumulated tool time
&lt;/h2&gt;

&lt;p&gt;Consider two calls that start together and each finish after thirty seconds.&lt;/p&gt;

&lt;p&gt;The calls contribute sixty seconds to an accumulated duration. Only thirty seconds passed on the clock. If a parent tool waits for a child operation and both are recorded, summing their durations can count overlapping work again.&lt;/p&gt;

&lt;p&gt;That total can help identify where activity concentrates. It does not tell you how much sooner the task would finish if you optimized one row.&lt;/p&gt;

&lt;p&gt;For a single task, keep its start and finish alongside individual call intervals. Inspect which operations actually delayed completion.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check the boundaries before blaming a command
&lt;/h2&gt;

&lt;p&gt;These are different measurements:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Measurement&lt;/th&gt;
&lt;th&gt;Possible boundaries&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Approval wait&lt;/td&gt;
&lt;td&gt;Request displayed to permission granted&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Command runtime&lt;/td&gt;
&lt;td&gt;Process started to process exited&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Agent-observed tool duration&lt;/td&gt;
&lt;td&gt;Tool requested to result received&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Task elapsed time&lt;/td&gt;
&lt;td&gt;Task started to accepted result&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A tool duration may contain approval time, queueing, execution and result delivery. The boundaries depend on the recorder.&lt;/p&gt;

&lt;p&gt;For an independent command measurement, use a monotonic elapsed-time clock around the process. Python's &lt;a href="https://docs.python.org/3/library/time.html#time.perf_counter" rel="noopener noreferrer"&gt;performance counter documentation&lt;/a&gt; explains that the counter includes elapsed sleep time; it is not a CPU-usage measurement. Record the working directory and relevant conditions privately so a second run is comparable.&lt;/p&gt;

&lt;p&gt;Do not turn off permission checks to make a chart look better. First establish whether waiting accounts for the apparent slowdown.&lt;/p&gt;

&lt;h2&gt;
  
  
  Compare frequency, typical duration and outliers
&lt;/h2&gt;

&lt;p&gt;Imagine this small report. These are invented numbers for illustration, not a benchmark:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Operation&lt;/th&gt;
&lt;th&gt;Calls&lt;/th&gt;
&lt;th&gt;Median duration&lt;/th&gt;
&lt;th&gt;Longest&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Read&lt;/td&gt;
&lt;td&gt;300&lt;/td&gt;
&lt;td&gt;0.04 s&lt;/td&gt;
&lt;td&gt;0.9 s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Test suite&lt;/td&gt;
&lt;td&gt;20&lt;/td&gt;
&lt;td&gt;12 s&lt;/td&gt;
&lt;td&gt;180 s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Build&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;45 s&lt;/td&gt;
&lt;td&gt;48 s&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The most frequent operation is not necessarily your largest delay. The long test run deserves a closer look, but the table alone cannot tell you whether it waited for permission, ran a larger test selection or encountered a slow dependency.&lt;/p&gt;

&lt;p&gt;Group comparable commands together. A focused unit test and an integration suite can share an executable while doing very different work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Investigate retries before removing them
&lt;/h2&gt;

&lt;p&gt;Three searches for the same filename may indicate an unhelpful loop. They may also occur before an edit, after an edit and during verification.&lt;/p&gt;

&lt;p&gt;Read the sequence around the repeated call. Ask what changed between attempts, what each result established, and whether the agent used that result.&lt;/p&gt;

&lt;p&gt;Likewise, a failed test can be useful evidence. An intentionally failing regression test followed by a fix should not be treated like an authentication error retried without a change.&lt;/p&gt;

&lt;p&gt;Record the denominator when discussing failures: two failures out of three calls deserve different scrutiny from two failures out of three thousand.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a local activity report can establish
&lt;/h2&gt;

&lt;p&gt;I build ccdeck. Its &lt;a href="https://ccdeck.dev/guides/tool-activity/" rel="noopener noreferrer"&gt;Tool activity guide&lt;/a&gt; describes counts, accumulated durations, median durations and failures for recorded Claude Code and Codex calls on one device.&lt;/p&gt;

&lt;p&gt;Its documented timing includes approval waits. Concurrent calls each contribute to the total, and the two CLIs use different timing boundaries. Command chains can also contribute multiple rows sharing the same interval.&lt;/p&gt;

&lt;p&gt;That makes the report a place to find a candidate for investigation, not a direct ranking of model speed. The stored aggregate history omits raw arguments and output, so diagnosing a particular call may require separate session evidence. Capture starts when recording begins; it does not reconstruct older sessions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Change one cause and rerun the task
&lt;/h2&gt;

&lt;p&gt;Choose a concrete intervention: correct a broken command, narrow an unnecessarily broad test run, or remove a retry that receives the same error without changing its input.&lt;/p&gt;

&lt;p&gt;Repeat a comparable task and check both elapsed time and correctness. Fewer calls are useful only if the required work still happens.&lt;/p&gt;

&lt;p&gt;Keep the original trace and your explanation of the change. That is more useful than a faster-looking chart whose measurement boundaries remain unknown.&lt;/p&gt;

</description>
      <category>claudecode</category>
      <category>ai</category>
      <category>productivity</category>
      <category>devtools</category>
    </item>
    <item>
      <title>Your agent loaded a skill. Did it actually follow it?</title>
      <dc:creator>Bargan Constantin</dc:creator>
      <pubDate>Tue, 03 Nov 2026 13:45:15 +0000</pubDate>
      <link>https://dev.to/bargan/your-agent-loaded-a-skill-did-it-actually-follow-it-1o6h</link>
      <guid>https://dev.to/bargan/your-agent-loaded-a-skill-did-it-actually-follow-it-1o6h</guid>
      <description>&lt;p&gt;Installing a skill answers one question: is it available? It does not tell you whether the agent loaded it, followed it, or produced a better result.&lt;/p&gt;

&lt;p&gt;Those are separate checks. Mixing them makes it easy to delete a useful skill because it was quiet for a week, or keep a popular one that repeatedly produces work you have to repair.&lt;/p&gt;

&lt;h2&gt;
  
  
  Separate availability, loading and results
&lt;/h2&gt;

&lt;p&gt;Claude Code lets you invoke a skill directly with &lt;code&gt;/skill-name&lt;/code&gt;, and can select eligible skills itself. The skill's body loads when it is used. Its description helps determine when that happens. See the &lt;a href="https://code.claude.com/docs/en/skills" rel="noopener noreferrer"&gt;Claude Code skills documentation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;A useful review asks three questions:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Question&lt;/th&gt;
&lt;th&gt;Evidence to look for&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Was the skill available?&lt;/td&gt;
&lt;td&gt;The skill configuration and the session's available skills&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Was it loaded?&lt;/td&gt;
&lt;td&gt;A recorded invocation or instruction read&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Was it followed successfully?&lt;/td&gt;
&lt;td&gt;The resulting actions, artifacts and checks&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The second row does not establish the third. Loading a deployment checklist does not prove that the deployment checks ran.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with a small experiment
&lt;/h2&gt;

&lt;p&gt;Pick a workflow you already understand. Write down what a satisfactory result requires before changing its instructions.&lt;/p&gt;

&lt;p&gt;For a review skill, that might mean finding a known defect, explaining its effect, and avoiding unrelated edits. For a documentation skill, it might mean accurate commands and links that resolve.&lt;/p&gt;

&lt;p&gt;Use a disposable branch or sample project. Keep the task prompt and starting state. Run the task, inspect the output, and record:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;whether you explicitly requested the skill;&lt;/li&gt;
&lt;li&gt;whether there is evidence it loaded;&lt;/li&gt;
&lt;li&gt;which required checks actually happened;&lt;/li&gt;
&lt;li&gt;what you had to correct afterward.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Repeat after one focused change to the skill. A few runs can expose a problem; they do not establish a universal success rate. Model, permissions and repository state can all change the outcome.&lt;/p&gt;

&lt;h2&gt;
  
  
  Read activity as a lead for investigation
&lt;/h2&gt;

&lt;p&gt;I build ccdeck. Its &lt;a href="https://ccdeck.dev/guides/skill-activity/" rel="noopener noreferrer"&gt;Skill activity guide&lt;/a&gt; documents a local view of recorded skill loads for Claude Code and Codex, separating agent selection from commands you typed.&lt;/p&gt;

&lt;p&gt;The view can show counts, recent uses and projects, with session links while those sessions remain on the canvas. Repeated identical commands in a session are excluded from the use count. A skill merely mentioned in a message is not a use.&lt;/p&gt;

&lt;p&gt;Treat those records as leads for inspection. They are not quality scores or proof that instructions were obeyed. The guide also documents capture prerequisites and missing historical coverage: older sessions are not retroactively added. An absent row does not establish that a skill was never useful.&lt;/p&gt;

&lt;h2&gt;
  
  
  Decide what to change
&lt;/h2&gt;

&lt;p&gt;If you repeatedly type a skill that you expected the agent to select, inspect its description and invocation settings.&lt;/p&gt;

&lt;p&gt;If a skill loads but misses a required step, inspect the instruction and the actual run together. Make the requirement concrete, then test it again.&lt;/p&gt;

&lt;p&gt;If it rarely loads, first ask how often the relevant task occurred. A migration checklist can be valuable even when migrations are infrequent.&lt;/p&gt;

&lt;p&gt;Keep a short record of the task, observed behavior and correction. That gives the next edit a reason beyond “this skill feels better.”&lt;/p&gt;

</description>
      <category>claudecode</category>
      <category>ai</category>
      <category>productivity</category>
      <category>devtools</category>
    </item>
    <item>
      <title>Is it your agents? Reading load against your core count, per-core CPU, memory and temperature</title>
      <dc:creator>Bargan Constantin</dc:creator>
      <pubDate>Sun, 01 Nov 2026 20:17:02 +0000</pubDate>
      <link>https://dev.to/bargan/is-it-your-agents-reading-load-against-your-core-count-per-core-cpu-memory-and-temperature-4oek</link>
      <guid>https://dev.to/bargan/is-it-your-agents-reading-load-against-your-core-count-per-core-cpu-memory-and-temperature-4oek</guid>
      <description>&lt;p&gt;This article was prepared with AI assistance, using ccdeck’s source code and documentation to check the technical details.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I build &lt;a href="https://github.com/BarganConstantin/ccdeck" rel="noopener noreferrer"&gt;ccdeck&lt;/a&gt;, a local dashboard for Claude Code and Codex sessions. Its This machine panel is the worked example here. The Linux facts come from the linked man pages and kernel documentation. The panel examples were checked against 3.48.0 and rechecked against the public README on 1 November 2026. All pictured readings, including the cover, are demo data rather than measurements of a real workload.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The fans spin up and the laptop gets hot under your wrists. Nothing &lt;em&gt;you&lt;/em&gt; started is heavy. But four agents are running, and in the last ten minutes each of them decided the right next step was to run the test suite, a type check and a bundler, all at once.&lt;/p&gt;

&lt;p&gt;The questions are old ones: is the machine actually overloaded, by what, and how hot is it? The numbers that answer them are easy to misread. Here is how to read each one, with ccdeck's panel as an example of putting them next to the sessions that cause them.&lt;/p&gt;




&lt;h2&gt;
  
  
  Load average is a queue, not a percentage
&lt;/h2&gt;

&lt;p&gt;The first three fields of &lt;code&gt;/proc/loadavg&lt;/code&gt; count runnable tasks and tasks in uninterruptible I/O waits, averaged over 1, 5 and 15 minutes (&lt;a href="https://man7.org/linux/man-pages/man5/proc_loadavg.5.html" rel="noopener noreferrer"&gt;proc_loadavg(5)&lt;/a&gt;). The figures are not divided by CPU count: the same load can mean very different things on a one-core and a sixteen-core machine.&lt;/p&gt;

&lt;p&gt;So the number only means something next to your core count:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="nt"&gt;-v&lt;/span&gt; &lt;span class="nv"&gt;n&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;nproc&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="s1"&gt;'{ printf "1-minute load %.2f on %d cores: %.2fx\n", $1, n, $1/n }'&lt;/span&gt; /proc/loadavg
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Above &lt;code&gt;1.00x&lt;/code&gt;, the average count of running or waiting tasks exceeds the number of available logical CPUs. That is a reason to investigate, not a diagnosis by itself. Two cautions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;On Linux, the queue includes tasks waiting for disk&lt;/strong&gt; (state D). A high load with idle CPUs points at I/O; &lt;code&gt;top&lt;/code&gt;'s &lt;code&gt;wa&lt;/code&gt; field is "time waiting for I/O completion".&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Windows publishes no load average&lt;/strong&gt;, so there is no such figure to read there.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;ccdeck's panel does this division for you: when the one-minute load is above your core count, a line says by how much, as in &lt;em&gt;1.2× more work queued than cores to run it&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq98hucm4ups7vpocm6ju.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq98hucm4ups7vpocm6ju.webp" alt="The This machine panel: 16 cores at 78% CPU, load average 18.62 with 1.2× more work queued than cores to run it, 21.6 of 32 GB physical memory, download and upload rates, Claude API at 38 ms, a GPU section for an NVIDIA GeForce RTX 4070, then Thermal with CPU 71 °C and GPU 54 °C" width="340" height="726"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Demo data: a 16-core Linux computer while the demo sessions run their tests.&lt;/em&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  One pinned core hides in the total
&lt;/h2&gt;

&lt;p&gt;On a 16-core machine, one single-threaded build at 100% is 6.25% of the whole. The total looks calm while that build is as fast as it will ever be.&lt;/p&gt;

&lt;p&gt;Look per core instead. In &lt;code&gt;top&lt;/code&gt;, the &lt;code&gt;1&lt;/code&gt; key is the "Single/Separate-Cpu-States toggle"; &lt;code&gt;mpstat -P ALL 1&lt;/code&gt; (from sysstat) prints the same every second. ccdeck's panel draws one column per logical core under the total for this reason, and never colours CPU as a warning: at 90%, the computer is doing the work you asked for.&lt;/p&gt;


&lt;h2&gt;
  
  
  A process's %CPU is per core, and &lt;code&gt;ps&lt;/code&gt; averages over its lifetime
&lt;/h2&gt;

&lt;p&gt;Two tools, two meanings:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://man7.org/linux/man-pages/man1/top.1.html" rel="noopener noreferrer"&gt;&lt;code&gt;top&lt;/code&gt;&lt;/a&gt;&lt;/strong&gt;: a multithreaded process can exceed 100% in Irix mode. Solaris mode divides the figure by the number of CPUs; &lt;code&gt;I&lt;/code&gt; switches between them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://man7.org/linux/man-pages/man1/ps.1.html" rel="noopener noreferrer"&gt;&lt;code&gt;ps&lt;/code&gt;&lt;/a&gt;&lt;/strong&gt;: &lt;code&gt;%cpu&lt;/code&gt; averages CPU time over the process's elapsed lifetime. A test runner that has been busy for ten seconds and idle for an hour looks quiet in &lt;code&gt;ps&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So 312 in a per-core column is a little over three cores, and a &lt;code&gt;ps&lt;/code&gt; figure is history, not now. ccdeck's &lt;strong&gt;Busiest processes&lt;/strong&gt; list uses the per-core convention: the 40 busiest processes by CPU and the 40 largest by memory, with the resident size, the figure &lt;code&gt;ps&lt;/code&gt; and Task Manager show.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fl9hb59y185pkrs8c9awf.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fl9hb59y185pkrs8c9awf.webp" alt="Busiest processes, sorted by CPU: node running vitest at 312, esbuild at 188, node running tsc at 97, rg, claude, postgres, codex" width="800" height="437"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Demo data: one session's tests, bundler and type check are the three busiest.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Finding the session behind a process&lt;/strong&gt; is the step no single number gives you. On Linux, the process tree does:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ps &lt;span class="nt"&gt;-eo&lt;/span&gt; pid,ppid,pcpu,rss,args &lt;span class="nt"&gt;--forest&lt;/span&gt; | less &lt;span class="nt"&gt;-S&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;--forest&lt;/code&gt; draws the tree ("ASCII art process tree"), so a &lt;code&gt;vitest&lt;/code&gt; shows up under the &lt;code&gt;claude&lt;/code&gt; or &lt;code&gt;codex&lt;/code&gt; process that started it, and &lt;code&gt;pwdx &amp;lt;pid&amp;gt;&lt;/code&gt; prints its working folder, which you can match to a session. ccdeck's list does not make that link for you; you see &lt;code&gt;vitest&lt;/code&gt; at 312 and a session running tests, and connecting the two is still yours. It also cannot end a process; that belongs to a terminal, Activity Monitor or Task Manager.&lt;/p&gt;




&lt;h2&gt;
  
  
  Memory: trust "available", not "used"
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://man7.org/linux/man-pages/man5/proc_meminfo.5.html" rel="noopener noreferrer"&gt;&lt;code&gt;/proc/meminfo&lt;/code&gt;&lt;/a&gt; has a field made for the question "can I start more work?": &lt;code&gt;MemAvailable&lt;/code&gt;, an estimate of memory available to new applications without swapping. On Linux, total minus available gives a pressure-oriented view of physical memory in use. The example panel shows this as &lt;em&gt;Physical&lt;/em&gt; and turns its bar amber from 90%. It shows swap separately; on Windows that second row is &lt;em&gt;Commit&lt;/em&gt;, a different measure from physical RAM.&lt;/p&gt;




&lt;h2&gt;
  
  
  GPUs: ask the driver
&lt;/h2&gt;

&lt;p&gt;An NVIDIA card's own figures come from its driver's &lt;code&gt;nvidia-smi&lt;/code&gt;, on Linux and Windows. ccdeck's panel asks it every 5 seconds for each GPU's utilization, video memory used and total, temperature and power, and draws a section per GPU; with no &lt;code&gt;nvidia-smi&lt;/code&gt; on the PATH it draws none and installs nothing. It keeps no history of these, and they are the GPUs in your computer, not the ones running a cloud model.&lt;/p&gt;




&lt;h2&gt;
  
  
  Temperature: where each system keeps it, or does not
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Linux: sysfs, in millidegrees
&lt;/h3&gt;

&lt;p&gt;Two places, both readable without root:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;hwmon&lt;/strong&gt;: each &lt;code&gt;/sys/class/hwmon/hwmonX&lt;/code&gt; has a &lt;code&gt;name&lt;/code&gt; (such as &lt;code&gt;coretemp&lt;/code&gt; or &lt;code&gt;nvme&lt;/code&gt;) and &lt;code&gt;tempY_input&lt;/code&gt; files, in "millidegree Celsius" (&lt;a href="https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-hwmon" rel="noopener noreferrer"&gt;kernel ABI&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;thermal zones&lt;/strong&gt;: &lt;code&gt;/sys/class/thermal/thermal_zoneX/temp&lt;/code&gt;, also in millidegrees, with a &lt;code&gt;type&lt;/code&gt; such as &lt;code&gt;acpitz&lt;/code&gt;, "an ACPI thermal device" (&lt;a href="https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-thermal" rel="noopener noreferrer"&gt;kernel ABI&lt;/a&gt;).
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;for &lt;/span&gt;h &lt;span class="k"&gt;in&lt;/span&gt; /sys/class/hwmon/hwmon&lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
  &lt;/span&gt;&lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s1"&gt;'%-12s %s\n'&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$h&lt;/span&gt;&lt;span class="s2"&gt;/name"&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$h&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;/temp&lt;span class="k"&gt;*&lt;/span&gt;_input 2&amp;gt;/dev/null | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-1&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On Intel, the kernel also reports thermal throttling per CPU under &lt;code&gt;/sys/devices/system/cpu/cpuX/thermal_throttle/&lt;/code&gt;: event counts and cumulative active time, including &lt;code&gt;core_throttle_total_time_ms&lt;/code&gt; and its package counterpart (&lt;a href="https://docs.kernel.org/admin-guide/thermal/intel_thermal_throttle.html" rel="noopener noreferrer"&gt;kernel docs&lt;/a&gt;). Sample an active-time counter twice and divide its increase by the elapsed time to estimate the fraction of that interval spent throttling. ccdeck reads hwmon first, then thermal zones; its Linux throttling reading uses changes in &lt;code&gt;package_throttle_total_time_ms&lt;/code&gt;, not the event count alone.&lt;/p&gt;

&lt;h3&gt;
  
  
  macOS: readable on Intel, private on Apple silicon
&lt;/h3&gt;

&lt;p&gt;On an Intel Mac, &lt;code&gt;ioreg&lt;/code&gt; gives the GPU and &lt;code&gt;pmset&lt;/code&gt; says how much of the CPU's speed is held back to cool it. On an M-series Mac, no command that ships with macOS prints a temperature: &lt;code&gt;powermetrics&lt;/code&gt; needs root, &lt;code&gt;pmset -g therm&lt;/code&gt; records nothing there, and the sensors sit behind a private API only native code can call. &lt;a href="https://github.com/vladkens/macmon" rel="noopener noreferrer"&gt;macmon&lt;/a&gt; reads them without &lt;code&gt;sudo&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;ccdeck does not ask you to install it. When the Mac's own sensors give nothing, it downloads macmon's published binary from GitHub once, verifies it against the SHA-256 the release publishes, checks that it runs, and keeps it in &lt;code&gt;~/.agents-deck/tools/macmon&lt;/code&gt;. That is skipped if &lt;code&gt;macmon&lt;/code&gt; is already on your PATH or from Homebrew, on an Intel Mac, and under &lt;code&gt;AGENTS_DECK_NO_DOWNLOAD=1&lt;/code&gt; or &lt;code&gt;AGENTS_DECK_NO_INSTALL=1&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Windows: often nothing, and that is the honest answer
&lt;/h3&gt;

&lt;p&gt;The places an ordinary program can look are a performance counter, &lt;code&gt;MSAcpi_ThermalZoneTemperature&lt;/code&gt;, and LibreHardwareMonitor's web server if you happen to run it. On many Windows laptops, all of them come up empty. ccdeck's README documents one such machine, a Windows 11 laptop with an Intel i5-9300H, checked as a normal user and as an administrator:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Its firmware declares &lt;strong&gt;zero&lt;/strong&gt; ACPI thermal zones, so the performance counter exists but has no instances.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;MSAcpi_ThermalZoneTemperature&lt;/code&gt; answers &lt;em&gt;Not supported&lt;/em&gt;, even to an administrator.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Win32_TemperatureProbe&lt;/code&gt; exists, but every field reads &lt;code&gt;32768&lt;/code&gt;, WMI's value for "unknown".&lt;/li&gt;
&lt;li&gt;The sensors are real, managed by Intel Dynamic Tuning, which publishes them where only an administrator can read.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is a class of machine, not a fault. There is no standard user-mode Windows API for CPU temperature, which is why HWiNFO, Core Temp and LibreHardwareMonitor all install a kernel driver.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;And a thermal zone is not the CPU.&lt;/strong&gt; It measures whatever the firmware wired it to, and on many laptops nothing: Intel's reference firmware then reports a fixed 27.85 °C, so the zone reads 28 °C however hot the CPU is. A figure that never moves is a placeholder. ccdeck draws a zone only once its value has changed, and calls the row &lt;em&gt;Thermal zone&lt;/em&gt;, never &lt;em&gt;CPU&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Virtual machines often expose no temperature sensor. When a sensor is unavailable, displaying &lt;code&gt;0 °C&lt;/code&gt; would confuse a missing value with a measurement; leave the reading unavailable instead. A constant value deserves investigation rather than automatic treatment as a real CPU temperature.&lt;/p&gt;




&lt;h2&gt;
  
  
  Keep a little history, at the right resolution
&lt;/h2&gt;

&lt;p&gt;A spike you did not see is the one you are asking about. ccdeck keeps up to a day of each reading in memory, one point per minute holding &lt;strong&gt;that minute's highest value&lt;/strong&gt;, so a short spike is not averaged away; dashed lines mark where memory, swap and the queue turn amber or red. It is memory only, so it starts again when the deck restarts. If you log your own, keep the maximum per bucket, not the mean.&lt;/p&gt;

&lt;p&gt;The machine readings are local and served on &lt;code&gt;127.0.0.1&lt;/code&gt;. The panel's latency indicator additionally performs a DNS lookup and TCP handshake to &lt;code&gt;api.anthropic.com:443&lt;/code&gt; about every 30 seconds while it is open on a machine with Claude Code; it sends no application payload. An Apple silicon Mac may also need the macmon download described above. These are the machine panel's network operations, not an inventory of the entire application's traffic.&lt;/p&gt;




&lt;h2&gt;
  
  
  The short version
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Divide the 1-minute load by &lt;code&gt;nproc&lt;/code&gt;. Above 1, work is queued; on Linux, check &lt;code&gt;wa&lt;/code&gt; before blaming the CPU.&lt;/li&gt;
&lt;li&gt;Look per core. One pinned core is invisible in the total.&lt;/li&gt;
&lt;li&gt;In &lt;code&gt;top&lt;/code&gt;, 312% is about three cores; in &lt;code&gt;ps&lt;/code&gt;, %CPU is a lifetime average.&lt;/li&gt;
&lt;li&gt;Trust &lt;code&gt;MemAvailable&lt;/code&gt;, not "used".&lt;/li&gt;
&lt;li&gt;Temperatures live in sysfs on Linux, behind a private API on Apple silicon, and often nowhere an ordinary program can reach on Windows laptops. No reading is a valid answer; a fixed 28 °C is not a reading.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>linux</category>
      <category>performance</category>
      <category>claudecode</category>
      <category>ai</category>
    </item>
    <item>
      <title>How to write a Claude Code hook that cannot steer your agent</title>
      <dc:creator>Bargan Constantin</dc:creator>
      <pubDate>Thu, 29 Oct 2026 16:33:52 +0000</pubDate>
      <link>https://dev.to/bargan/how-to-write-a-claude-code-hook-that-cannot-steer-your-agent-3f83</link>
      <guid>https://dev.to/bargan/how-to-write-a-claude-code-hook-that-cannot-steer-your-agent-3f83</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;I build &lt;a href="https://github.com/BarganConstantin/ccdeck" rel="noopener noreferrer"&gt;ccdeck&lt;/a&gt;, a local dashboard for Claude Code and Codex sessions, and its hook is the worked example; everything about it is quoted from the source at &lt;a href="https://github.com/BarganConstantin/ccdeck/tree/v3.42.0" rel="noopener noreferrer"&gt;the v3.42.0 tag&lt;/a&gt; (&lt;code&gt;hook/hook.js&lt;/code&gt;, &lt;code&gt;src/server/installer.mjs&lt;/code&gt; and &lt;code&gt;src/web/__tests__/hook-read-only.test.ts&lt;/code&gt;, with two more tests named where they come up); at 3.48.0 the hook, its tests and the quoted installer lines are unchanged. Claude Code's behaviour is quoted from Anthropic's &lt;a href="https://code.claude.com/docs/en/hooks" rel="noopener noreferrer"&gt;hooks reference&lt;/a&gt; as I read it on 14 October 2026.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Plenty of hooks only want to watch: a logger, a notifier, a dashboard. They still run on every event they register for, and on some events Claude Code waits for them and reads what they say. A &lt;code&gt;PreToolUse&lt;/code&gt; hook sees &lt;code&gt;rm -rf&lt;/code&gt; before it runs, and its answer can decide whether it does.&lt;/p&gt;

&lt;p&gt;The read-only claim needs to hold in the code. List every channel the hook has for talking back, close each one, and test that it stays closed.&lt;/p&gt;




&lt;h2&gt;
  
  
  Every way a hook can talk back
&lt;/h2&gt;

&lt;p&gt;A command hook gets the event as JSON on stdin. From the reference, it has these ways to affect what happens next:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;JSON on stdout.&lt;/strong&gt; "Claude Code parses your stdout as JSON output when the whole output is one JSON object", and its fields can allow, deny, defer or rewrite the call. With a valid JSON object, an exit code other than 0 or 2 is ignored: "the fields alone decide".&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Exit code 2.&lt;/strong&gt; "Exit with code 2 to block the action", with stderr as the reason.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Any other non-zero exit.&lt;/strong&gt; Not a block, but "a &lt;code&gt;&amp;lt;hook name&amp;gt; hook error&lt;/code&gt; notice in the transcript", on every call it happens on.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Plain text on stdout, on some events.&lt;/strong&gt; For &lt;code&gt;UserPromptSubmit&lt;/code&gt;, &lt;code&gt;UserPromptExpansion&lt;/code&gt;, &lt;code&gt;SessionStart&lt;/code&gt; and &lt;code&gt;PostModelSwitch&lt;/code&gt;, "Claude Code adds plain-text stdout as context that Claude can see and act on". A stray log line there is a message to the model.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The entry's own fields.&lt;/strong&gt; &lt;code&gt;onFailure: "block"&lt;/code&gt; turns any failure (a crash, a missing script, a timeout) into a block. &lt;code&gt;async: true&lt;/code&gt; removes the blocking, but not the voice: when an async hook exits, its &lt;code&gt;additionalContext&lt;/code&gt; and &lt;code&gt;systemMessage&lt;/code&gt; reach Claude on the next turn.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Time.&lt;/strong&gt; The default timeout for a command hook is 600 seconds on most events, and hooks "block Claude's execution until they complete". A timed-out hook "doesn't block the tool call", but you waited for it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An HTTP hook (&lt;code&gt;type: "http"&lt;/code&gt;) has the same powers through its response body, so a hook that POSTs straight to a local service hands the decision to whatever answers on that port; and a failed connection is a non-blocking error, a notice on every call while the service is down.&lt;/p&gt;

&lt;p&gt;For an observer, that list turns into rules: &lt;strong&gt;a command hook that never writes to stdout, exits 0 on every path, declares no &lt;code&gt;onFailure&lt;/code&gt; or &lt;code&gt;async&lt;/code&gt;, keeps a short timeout, and checks who it is talking to before it sends anything.&lt;/strong&gt; The rest of this post is how ccdeck's hook does each of those, and how its tests pin them.&lt;/p&gt;




&lt;h2&gt;
  
  
  Rule 1: nothing on stdout, exit 0 everywhere
&lt;/h2&gt;

&lt;p&gt;ccdeck's test file opens with the reason it exists:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// The README says the deck cannot steer your agent. This is the file that makes&lt;/span&gt;
&lt;span class="c1"&gt;// that a property of the code rather than an intention.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and names the failure it guards against:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;One console.log left in from debugging, or one &lt;code&gt;process.exit(1)&lt;/code&gt; on an error path, turns a read-only observer into a participant in every tool call on the machine — and silently, because a hook that prints unparseable text is ignored until the day it prints something parseable, and a hook that exits non-zero either blocks the call it was reporting (exit 2) or shows a hook error on it (any other code).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Every path in &lt;code&gt;hook.js&lt;/code&gt; is written to end at exit 0. A throw is the one way out that a reader of the code cannot see, so there is a last resort:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;uncaughtException&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;unhandledRejection&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That line came from a bug: a malformed record in the deck's registry crashed the hook with exit 1 and a stack trace, and, per the comment, "Claude Code surfaces a non-zero exit as &lt;code&gt;&amp;lt;hook&amp;gt; hook error&lt;/code&gt; plus the first stderr line", on every tool call.&lt;/p&gt;




&lt;h2&gt;
  
  
  Rule 2: test the source for every other channel
&lt;/h2&gt;

&lt;p&gt;Writing the rule down is not enough; the next debugging session undoes it. &lt;code&gt;hook-read-only.test.ts&lt;/code&gt; asserts it twice.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Over the source&lt;/strong&gt;, it bans every spelling of stdout and every exit code but one:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SRC&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;not&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toMatch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;\b&lt;/span&gt;&lt;span class="sr"&gt;process&lt;/span&gt;&lt;span class="se"&gt;\s&lt;/span&gt;&lt;span class="sr"&gt;*&lt;/span&gt;&lt;span class="se"&gt;\.\s&lt;/span&gt;&lt;span class="sr"&gt;*stdout&lt;/span&gt;&lt;span class="se"&gt;\b&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SRC&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;not&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toMatch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;\b&lt;/span&gt;&lt;span class="sr"&gt;console&lt;/span&gt;&lt;span class="se"&gt;\s&lt;/span&gt;&lt;span class="sr"&gt;*&lt;/span&gt;&lt;span class="se"&gt;\.&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SRC&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;not&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toMatch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;\b&lt;/span&gt;&lt;span class="sr"&gt;writeSync&lt;/span&gt;&lt;span class="se"&gt;\s&lt;/span&gt;&lt;span class="sr"&gt;*&lt;/span&gt;&lt;span class="se"&gt;\(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// …&lt;/span&gt;
&lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;writes&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toEqual&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;req.write(body);&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;          &lt;span class="c1"&gt;// the one write: the outbound request&lt;/span&gt;
&lt;span class="c1"&gt;// …&lt;/span&gt;
&lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;([...&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;codes&lt;/span&gt;&lt;span class="p"&gt;)]).&lt;/span&gt;&lt;span class="nf"&gt;toEqual&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;0&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;            &lt;span class="c1"&gt;// every process.exit(…) is exit(0)&lt;/span&gt;
&lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SRC&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;not&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toMatch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/process&lt;/span&gt;&lt;span class="se"&gt;\s&lt;/span&gt;&lt;span class="sr"&gt;*&lt;/span&gt;&lt;span class="se"&gt;\.\s&lt;/span&gt;&lt;span class="sr"&gt;*exitCode/&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;console.log&lt;/code&gt; is stdout with another name and &lt;code&gt;fs.writeSync(1, …)&lt;/code&gt; is stdout with no name, so all three spellings are banned. &lt;code&gt;process.exitCode&lt;/code&gt; is banned outright rather than checked for a value.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;By running the real script&lt;/strong&gt;, it starts an "honest deck" (a local HTTP server that answers the handshake below), feeds the hook a &lt;code&gt;PreToolUse&lt;/code&gt; for &lt;code&gt;rm -rf /&lt;/code&gt; on stdin, and checks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;deck&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;seen&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toEqual&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/api/event&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;   &lt;span class="c1"&gt;// it really delivered&lt;/span&gt;
&lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;run&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;stdout&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toBe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;                 &lt;span class="c1"&gt;// and said nothing back&lt;/span&gt;
&lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;run&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;code&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toBe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The delivery is asserted on purpose: silence from a hook that did nothing would prove nothing. The same silence is then checked on every early return (no deck, unparseable payload, no &lt;code&gt;cwd&lt;/code&gt;), on payloads that throw (a &lt;code&gt;cwd&lt;/code&gt; that is a number, JSON nested 20,000 levels deep), and on eight malformed registry records, and a healthy deck registered next to a malformed record must still receive its event. Every run points &lt;code&gt;CLAUDE_CONFIG_DIR&lt;/code&gt; and &lt;code&gt;HOME&lt;/code&gt; at a temp directory, so the test never reads your real &lt;code&gt;~/.claude&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Rule 3: a time budget counted from process start
&lt;/h2&gt;

&lt;p&gt;On &lt;code&gt;PreToolUse&lt;/code&gt; the user waits until every matching hook returns, and the installer's comment is blunt about the declared &lt;code&gt;timeout&lt;/code&gt;: it "is in SECONDS and it is a kill". So the hook has a deadline per phase and a cap over all of them:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;CHALLENGE_TIMEOUT_MS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;   &lt;span class="c1"&gt;// one retry, only on a timeout&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;POST_TIMEOUT_MS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;DISCOVERY_TIMEOUT_MS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;   &lt;span class="c1"&gt;// a second window only if the first found nothing&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;CAP_MS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1900&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The cap is measured from when Node started, not from when &lt;code&gt;main()&lt;/code&gt; ran:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;CAP_MS&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;uptime&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;)));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That detail came from a measurement. The old timer started inside &lt;code&gt;main()&lt;/code&gt;, so the shell fork, Node's start-up and reading a stdin payload that can be megabytes were outside the budget. With a stalled deck, the hook came out at 1.84 s idle and 1.98–2.19 s on a loaded machine, past the &lt;code&gt;timeout: 2&lt;/code&gt; it declared at the time (issue #1018). Now the cap counts from process start, the declared timeout is 3 seconds as a backstop, and &lt;code&gt;hook-budget.test.ts&lt;/code&gt; pins the two numbers against each other so they cannot drift apart again.&lt;/p&gt;

&lt;p&gt;The deadlines can add up to more than the cap (2.6 s if the filesystem, a listener and a deck all stall on one run), and the source says which number to believe: the cap "is the backstop over all of them, and it is what a reader should believe rather than the addition". Discovery gets its second 400 ms window only when the first found no deck and reads were still out, because on a loaded machine those reads are usually slow rather than stalled (issue #1872). A dead port costs nothing: a refused loopback connection is instant.&lt;/p&gt;




&lt;h2&gt;
  
  
  Rule 4: prove the listener before you send
&lt;/h2&gt;

&lt;p&gt;An observer usually forwards the event somewhere, and the event is everything: in the hook's own words, "prompt text, tool inputs, tool results, cwd". Sending it to a port because a process ID looks alive is not safe. A deck killed with &lt;code&gt;SIGKILL&lt;/code&gt; or a power cut leaves its record behind, the OS can hand the PID to another process, and the port "may by then belong to anything at all (4317, the deck's own default, is also the standard OTLP collector port)".&lt;/p&gt;

&lt;p&gt;So each running deck writes a fresh random token into its record at start-up, and before posting, the hook challenges the listener with a nonce it has never seen:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;challengeProof&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;token&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;nonce&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;crypto&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createHash&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sha256&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;update&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;token&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;:&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;nonce&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;digest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hex&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The token itself never crosses the wire, so a wrong listener learns nothing it could replay, and the answer is compared with &lt;code&gt;crypto.timingSafeEqual&lt;/code&gt;, "purely so a hostile listener cannot walk the expected proof out of us one byte at a time".&lt;/p&gt;




&lt;h2&gt;
  
  
  Rule 5: plan for the runtime disappearing
&lt;/h2&gt;

&lt;p&gt;The command written into someone's settings outlives the environment it was written in. ccdeck builds its entries for &lt;code&gt;~/.claude/settings.json&lt;/code&gt; like this, one per event for up to twelve events, tagged so they can be found and removed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;buildHookEntry&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;command&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;MARK_KEY&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;                       &lt;span class="c1"&gt;// "__agent-dag"&lt;/span&gt;
    &lt;span class="na"&gt;hooks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;command&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;command&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;timeout&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="p"&gt;}],&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The command used to name the Node binary directly. Then &lt;code&gt;nvm uninstall&lt;/code&gt; took that binary away, and every tool call of every session showed a hook error from then on. On macOS and Linux the arguments now go through a fixed &lt;code&gt;/bin/sh&lt;/code&gt; script first:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;NODE_FALLBACK&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;n=$1; shift; [ -x "$n" ] || n=$(command -v node) || exit 0; exec "$n" "$@"&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It runs the recorded Node while it is still executable, the &lt;code&gt;node&lt;/code&gt; on Claude Code's own PATH once it is not, and nothing at all when there is no Node: exit 0, no output. The Claude Code version is part of the environment too. Until 2.1.101, an event name Claude Code did not know made it ignore the whole settings file, so ccdeck adds its two newest entries only where every Claude Code it finds knows them: &lt;code&gt;StopFailure&lt;/code&gt; from 2.1.78, and &lt;code&gt;UserPromptExpansion&lt;/code&gt; from 2.1.116. That second one is also an event where plain text on stdout becomes context for the model, which is Rule 1 again. The paths reach it as positional arguments, quoted once, so none of them is spliced into shell code. &lt;code&gt;hook-command-node-fallback.test.ts&lt;/code&gt; runs it through a real &lt;code&gt;/bin/sh&lt;/code&gt; and states the trade: "a hook error on every tool call is a worse answer than a deck that hears nothing from a machine it cannot run on."&lt;/p&gt;

&lt;p&gt;One more case of the environment surprising you: &lt;strong&gt;your own tool's Claude runs fire your hooks too.&lt;/strong&gt; ccdeck reads Claude quota in one of its ways with &lt;code&gt;claude --print /usage&lt;/code&gt;, which is itself a Claude Code run. Without a guard, every quota poll drew itself on the dashboard as an empty session. The deck marks that run with &lt;code&gt;AGENTS_DECK_INTERNAL=1&lt;/code&gt;, and the hook exits before reading a byte.&lt;/p&gt;




&lt;h2&gt;
  
  
  What this does not guarantee
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;It is a guarantee about one file.&lt;/strong&gt; Anything that can write to your &lt;code&gt;~/.claude&lt;/code&gt; can change &lt;code&gt;settings.json&lt;/code&gt; or the hook itself. No hook design defends against that. (ccdeck writes two other things there, separate from the hook: its Telemetry Radar switches write flags into the &lt;code&gt;env&lt;/code&gt; block when you flip one, and its Settings › Claude Code page writes the one key you change; its uninstall leaves both as you set them.)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It is a guarantee about the hook, not about every button.&lt;/strong&gt; ccdeck's Continue, on a background session whose turn stopped on an error, runs Claude Code's own &lt;code&gt;claude stop&lt;/code&gt; and &lt;code&gt;claude --resume &amp;lt;id&amp;gt; --bg&lt;/code&gt; at your press. That is a program starting a Claude Code command beside the session, not the hook answering one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The receiver sees everything the hook sees.&lt;/strong&gt; Prompts, tool inputs and results go to &lt;code&gt;127.0.0.1&lt;/code&gt;. That is the point of a dashboard; the handshake exists so they go only to it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fire-and-forget means gaps.&lt;/strong&gt; If no deck is running, the event is not recorded.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Very large events arrive cut.&lt;/strong&gt; The deck refuses a body over 5,000,000 characters, and a &lt;code&gt;PostToolUse&lt;/code&gt; for an Edit carries the whole edited file. Over 4,900,000 the hook replaces the biggest fields with a marker saying how large they were, and flags the event as truncated; the event name, session, tool and call id are never what goes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It still costs a process per event&lt;/strong&gt;: a Node start on every hook call, with a &lt;code&gt;/bin/sh&lt;/code&gt; in front of it on macOS and Linux, bounded by the budget above.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  A checklist for any observing hook
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Use a &lt;strong&gt;command&lt;/strong&gt; hook, without &lt;code&gt;onFailure&lt;/code&gt; and without &lt;code&gt;async&lt;/code&gt;. Write &lt;strong&gt;nothing&lt;/strong&gt; to stdout, on any event: on &lt;code&gt;UserPromptSubmit&lt;/code&gt; and &lt;code&gt;SessionStart&lt;/code&gt;, plain text is context for the model.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Exit 0 on every path&lt;/strong&gt;, and catch the throws you cannot see.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test the source&lt;/strong&gt; for every spelling of stdout and every exit code but 0, then run the real script and assert that it delivered and said nothing.&lt;/li&gt;
&lt;li&gt;Give it a &lt;strong&gt;time budget from process start&lt;/strong&gt;, and keep the declared &lt;code&gt;timeout&lt;/code&gt; strictly above it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prove the listener&lt;/strong&gt; before sending the event; a live PID is not proof.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Survive a missing runtime&lt;/strong&gt; with a silent fallback, and guard against your own tool's runs firing the hook.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;AI assistance was used to prepare this article and check it against the cited source code and documentation.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>claudecode</category>
      <category>node</category>
      <category>security</category>
      <category>testing</category>
    </item>
    <item>
      <title>What Codex CLI writes to disk for every session, and how to follow it live</title>
      <dc:creator>Bargan Constantin</dc:creator>
      <pubDate>Thu, 29 Oct 2026 16:32:55 +0000</pubDate>
      <link>https://dev.to/bargan/what-codex-cli-writes-to-disk-for-every-session-and-how-to-follow-it-live-1i04</link>
      <guid>https://dev.to/bargan/what-codex-cli-writes-to-disk-for-every-session-and-how-to-follow-it-live-1i04</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;I build &lt;a href="https://github.com/BarganConstantin/ccdeck" rel="noopener noreferrer"&gt;ccdeck&lt;/a&gt;, a local dashboard that reads these files, and it is the example in this post; every switch is in &lt;a href="https://ccdeck.dev/guides/codex/" rel="noopener noreferrer"&gt;its Codex guide&lt;/a&gt;. The file samples are from codex-cli 0.162.1 on my machine, Codex's docs are quoted as I read them on 14 October 2026, and ccdeck is described as of 3.48.0.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I run Codex CLI in two or three repositories at once, each in its own terminal, each a scroll of commands, patches and output. Codex has part of the overview itself, and it is worth starting there:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;codex agents&lt;/code&gt;&lt;/strong&gt;, added in Codex CLI 0.149.0, is "an interactive &lt;code&gt;codex agents&lt;/code&gt; dashboard for searching, starting, opening, renaming, and stopping tasks". &lt;code&gt;codex queue&lt;/code&gt;, from the same release, sends messages to existing sessions.&lt;/li&gt;
&lt;li&gt;Inside a session, &lt;strong&gt;&lt;code&gt;/status&lt;/code&gt;&lt;/strong&gt; shows its model, approval policy, writable roots and current token usage, and &lt;strong&gt;&lt;code&gt;/statusline&lt;/code&gt;&lt;/strong&gt; can keep rate limits and token counters in Codex's footer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For anything else, such as every session's tool calls as they happen, or a view that does not depend on which terminal you are in, the source is a file Codex already writes.&lt;/p&gt;




&lt;h2&gt;
  
  
  Where the files are
&lt;/h2&gt;

&lt;p&gt;Codex's configuration docs say it "stores its local state under &lt;code&gt;CODEX_HOME&lt;/code&gt; (defaults to &lt;code&gt;~/.codex&lt;/code&gt;)", and name &lt;code&gt;config.toml&lt;/code&gt;, &lt;code&gt;auth.json&lt;/code&gt;, logs and &lt;code&gt;history.jsonl&lt;/code&gt; there. They do not describe the per-session files, which sit beside them:&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/rollout-*.jsonl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One file per session, in the folder for the day it started. Because the docs leave them out, treat the format as Codex's own: read it defensively, and expect new kinds of line.&lt;/p&gt;




&lt;h2&gt;
  
  
  What a line looks like
&lt;/h2&gt;

&lt;p&gt;Each line is one JSON object with a &lt;code&gt;timestamp&lt;/code&gt;, a &lt;code&gt;type&lt;/code&gt; and a &lt;code&gt;payload&lt;/code&gt;. Counting the kinds in one of my sessions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;f&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-t&lt;/span&gt; ~/.codex/sessions/&lt;span class="k"&gt;*&lt;/span&gt;/&lt;span class="k"&gt;*&lt;/span&gt;/&lt;span class="k"&gt;*&lt;/span&gt;/rollout-&lt;span class="k"&gt;*&lt;/span&gt;.jsonl | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-1&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;
jq &lt;span class="nt"&gt;-r&lt;/span&gt; &lt;span class="s1"&gt;'[.type, (.payload.type // "-")] | join(" ")'&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$f&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; | &lt;span class="nb"&gt;sort&lt;/span&gt; | &lt;span class="nb"&gt;uniq&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt; | &lt;span class="nb"&gt;sort&lt;/span&gt; &lt;span class="nt"&gt;-rn&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    468 event_msg item_completed
    178 event_msg token_count
    176 token_usage_record -
    134 response_item custom_tool_call_output
    134 response_item custom_tool_call
    115 response_item reasoning
     97 response_item message
     28 turn_context -
     27 event_msg task_started
     27 event_msg task_complete
     13 response_item function_call_output
     13 response_item function_call
      1 session_meta -
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(trimmed). The ones a live view needs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;session_meta&lt;/code&gt;&lt;/strong&gt;, once at the top: the session id, &lt;code&gt;cwd&lt;/code&gt;, &lt;code&gt;cli_version&lt;/code&gt;, &lt;code&gt;model_provider&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;turn_context&lt;/code&gt;&lt;/strong&gt;, once per turn: &lt;code&gt;model&lt;/code&gt;, &lt;code&gt;approval_policy&lt;/code&gt;, &lt;code&gt;sandbox_policy&lt;/code&gt;, &lt;code&gt;effort&lt;/code&gt;. Join mid-session and you know neither the model nor whether the session can stop to ask until the next one arrives.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;response_item&lt;/code&gt;&lt;/strong&gt;: the conversation. A tool call is a &lt;code&gt;function_call&lt;/code&gt; or &lt;code&gt;custom_tool_call&lt;/code&gt; line, and its result the matching &lt;code&gt;…_output&lt;/code&gt; line with the same &lt;code&gt;call_id&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;event_msg&lt;/code&gt;&lt;/strong&gt;: what happened. &lt;code&gt;task_started&lt;/code&gt; and &lt;code&gt;task_complete&lt;/code&gt; bracket a turn; &lt;code&gt;token_count&lt;/code&gt; carries token usage and a rate-limit snapshot.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Following a session live
&lt;/h2&gt;

&lt;p&gt;The file is appended to as the session runs, so following it is &lt;code&gt;tail&lt;/code&gt; plus a parser:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;tail&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; 0 &lt;span class="nt"&gt;-F&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$f&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; | jq &lt;span class="nt"&gt;--unbuffered&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; &lt;span class="s1"&gt;'[.timestamp, .type, (.payload.type // "")] | @tsv'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A program that does this for every session has three more things to handle:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;New files.&lt;/strong&gt; A new session is a new file in today's folder, and a long session, or one picked up with &lt;code&gt;codex resume&lt;/code&gt;, keeps writing to its file in an older day folder.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Joining late.&lt;/strong&gt; Start reading mid-session and you have no &lt;code&gt;turn_context&lt;/code&gt; until the next turn: no model, no approval policy, no price for the tokens.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Partial lines.&lt;/strong&gt; The last line can be half-written when you read it; keep it until its newline arrives.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;ccdeck is one such program. It checks for new lines every 1.5 seconds and turns each session into a card named after its folder:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F75lif991ajoepynafpw0.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F75lif991ajoepynafpw0.webp" alt="A Codex session card: LIVE and a context ring at 15, then a GPT-5.5 chip and its running time on its second row, &amp;quot;approvals not visible&amp;quot;, 3 tools, 1 in-flight, 119.5k tok and 53¢, with three tool bubbles beside it"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Demo data. The last row counts the calls, then gives the tokens and an estimated cost.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The pill reads LIVE while a turn runs and DONE when Codex finishes it, or when you press &lt;code&gt;Esc&lt;/code&gt; in Codex. Tool calls get short names: &lt;code&gt;Shell&lt;/code&gt; for &lt;code&gt;exec&lt;/code&gt;/&lt;code&gt;shell&lt;/code&gt; and friends, &lt;code&gt;Edit&lt;/code&gt; for &lt;code&gt;apply_patch&lt;/code&gt;, &lt;code&gt;Plan&lt;/code&gt; for &lt;code&gt;update_plan&lt;/code&gt;, &lt;code&gt;Web&lt;/code&gt;, &lt;code&gt;stdin&lt;/code&gt; and &lt;code&gt;wait&lt;/code&gt;. A session that was already running when the deck started appears the next time it writes, from that point on, with &lt;code&gt;?&lt;/code&gt; beside its name, &lt;code&gt;≥&lt;/code&gt; before its time and a plain &lt;code&gt;Codex&lt;/code&gt; chip until its next turn starts: point 2 above, made visible. One caught mid-turn, its file written in the last 24 hours, is read back from the end of its file instead and appears at once, marked restored.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Failure is a guess.&lt;/strong&gt; The file records a tool's output, not a status. ccdeck counts a call as failed only when the output begins "Script failed", or "Exit code:" with a number other than 0, so a command that failed in some other way can still show ✓. Read the output before you trust the tick.&lt;/p&gt;


&lt;h2&gt;
  
  
  Tokens, cost and quota from the same file
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;token_count&lt;/code&gt; events hold two things.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Usage.&lt;/strong&gt; An &lt;code&gt;info&lt;/code&gt; object with &lt;code&gt;total_token_usage&lt;/code&gt;, &lt;code&gt;last_token_usage&lt;/code&gt; and &lt;code&gt;model_context_window&lt;/code&gt;: input (cached tokens included), output, and the context-window figures from Codex's most recent request. Pricing them needs a rate, and here the file goes only part of the way: it can say which service tier a session asked for (ccdeck reads it from a &lt;code&gt;thread_settings_applied&lt;/code&gt; event), not the tier a request was billed at. ccdeck prices cached tokens at the cache rate, the rest at the tier recorded for them (the standard rate where none is), Codex's auto-review checks on a ChatGPT plan at $0, and labels the result an estimate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A rate-limit snapshot.&lt;/strong&gt; A &lt;code&gt;rate_limits&lt;/code&gt; object with &lt;code&gt;primary&lt;/code&gt; and &lt;code&gt;secondary&lt;/code&gt; windows, each holding &lt;code&gt;used_percent&lt;/code&gt;, &lt;code&gt;window_minutes&lt;/code&gt; and &lt;code&gt;resets_at&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jq &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="s1"&gt;'select(.type == "event_msg" and .payload.type == "token_count")
       | .payload.rate_limits.primary'&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$f&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; | &lt;span class="nb"&gt;tail&lt;/span&gt; &lt;span class="nt"&gt;-1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"used_percent"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mf"&gt;93.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nl"&gt;"window_minutes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;10080&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nl"&gt;"resets_at"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;1792383934&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On my account "primary" was the 7-day window, so name windows by &lt;code&gt;window_minutes&lt;/code&gt;, not by position. And it is a snapshot from the last request: a session that has been idle for an hour holds an hour-old reading. ccdeck reads the quota about once a minute while its page is open, from Codex's usage endpoint rather than the file, and names each bar by its length (&lt;strong&gt;5-hour window&lt;/strong&gt;, &lt;strong&gt;7-day window&lt;/strong&gt;, &lt;strong&gt;30-day window&lt;/strong&gt;, or &lt;strong&gt;Rate limit&lt;/strong&gt; when OpenAI gives no length).&lt;/p&gt;




&lt;h2&gt;
  
  
  What the file never says
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;When a session is waiting for your approval.&lt;/strong&gt; Codex writes no approval request to the rollout file. A call waiting for you looks exactly like one still running. ccdeck's answer is to say so rather than guess: a running card shows &lt;strong&gt;approvals not visible&lt;/strong&gt; whenever its &lt;code&gt;approval_policy&lt;/code&gt; can ask (&lt;code&gt;untrusted&lt;/code&gt;, &lt;code&gt;on-request&lt;/code&gt;, &lt;code&gt;on-failure&lt;/code&gt;, or not read yet), and nothing at &lt;code&gt;never&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmp3xzd4kr8m4b27wgao4.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmp3xzd4kr8m4b27wgao4.webp" alt="Two Codex cards: infra under on-request shows &amp;quot;approvals not visible&amp;quot;; billing under never does not"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Demo data.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Codex itself has two ways to tell you, both in its config: &lt;code&gt;tui.notifications&lt;/code&gt; "can optionally filter by event type (for example, &lt;code&gt;agent-turn-complete&lt;/code&gt; and &lt;code&gt;approval-requested&lt;/code&gt;)", and &lt;code&gt;notify&lt;/code&gt; runs a program of yours, though only for &lt;code&gt;agent-turn-complete&lt;/code&gt;, with a JSON argument. Codex's &lt;code&gt;app-server&lt;/code&gt; also reports a waiting status; reading that from ccdeck is open work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When a session closed.&lt;/strong&gt; Nothing is written when you close the terminal. ccdeck keeps such a card LIVE until 90 minutes pass with no new line.&lt;/p&gt;

&lt;p&gt;ccdeck also draws no title for a Codex session, which a Claude Code card has, and joins a Codex sub-agent to its parent only when the file names that parent (&lt;code&gt;parent_thread_id&lt;/code&gt; in its &lt;code&gt;session_meta&lt;/code&gt;, or a sub-agent &lt;code&gt;started&lt;/code&gt; event in the parent's file).&lt;/p&gt;




&lt;h2&gt;
  
  
  The one write: refreshing the token safely
&lt;/h2&gt;

&lt;p&gt;Reading Codex's quota needs a live token from &lt;code&gt;$CODEX_HOME/auth.json&lt;/code&gt;, and tokens expire. Refreshing one from outside the CLI is where a reader can do damage: OpenAI's refresh tokens are single-use, so a rotation that never reaches disk leaves &lt;code&gt;auth.json&lt;/code&gt; holding a token that no longer works, and the next step is &lt;code&gt;codex login&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;ccdeck's refresh is a pattern worth copying for any file another program also writes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Only when needed: the token is within 90 seconds of expiring, or the usage endpoint turned it down.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One refresh at a time&lt;/strong&gt;, and the file is &lt;strong&gt;re-read inside a lock&lt;/strong&gt;, in case &lt;code&gt;codex&lt;/code&gt; refreshed it a moment earlier.&lt;/li&gt;
&lt;li&gt;The write is &lt;strong&gt;atomic&lt;/strong&gt;, and only the token fields are written; nothing else in &lt;code&gt;auth.json&lt;/code&gt; is touched.&lt;/li&gt;
&lt;li&gt;It happens only while a deck page is open or a quota notification is on.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The quota needs Codex signed in with &lt;code&gt;codex login&lt;/code&gt; and a ChatGPT account. With an API key there is no quota to read.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why read files instead of installing a hook
&lt;/h2&gt;

&lt;p&gt;The rollout file is on every system Codex runs on, and reading it installs nothing and asks for no trust prompt; starting ccdeck writes nothing in the Codex folder (the token refresh above is the one write, and only when needed). The cost of following rollout files is described above: a file written for Codex's own history tells you what happened, not what Codex is waiting on.&lt;/p&gt;

&lt;p&gt;If you try this yourself, the short version: &lt;code&gt;ls -t&lt;/code&gt; for the newest file, &lt;code&gt;tail -F&lt;/code&gt; it, key off &lt;code&gt;type&lt;/code&gt; and &lt;code&gt;payload.type&lt;/code&gt;, take the model and policy from &lt;code&gt;turn_context&lt;/code&gt;, and name quota windows by their minutes.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;AI assistance was used to prepare this article and check it against the cited source code and documentation.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>codex</category>
      <category>openai</category>
      <category>cli</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
