Troubleshoot ccdeck: status, logs, port and hooks
To troubleshoot ccdeck, start with npx ccdeck --status, which lists each running deck with its address and the folder it watches, and npx ccdeck --logs, which shows the last 200 lines the deck wrote; the guide then covers missing sessions, a lost tab and a missing quota or cost.
You will
- Find the running deck and read its log
- Get missing sessions onto the canvas
- Reconnect a tab that lost the deck
- Find out why a quota or cost is missing
Before you start
- A terminal on the same machine as the deck, with the deck’s
CLAUDE_CONFIG_DIR,CCDECK_HOME,CODEX_HOMEandCCDECK_CODEX_HOMESif you set any. Otherwise--statuscan miss the deck, andnpx ccdeckcan start another one or replace it. - With ccdeck installed globally, leave
npxout of the commands.
Steps
-
Check which deck is running
This lists each running deck, its address and the folder it watches.
npx ccdeck --statusno deck is runningmeans none runs for this config folder:npx ccdeckstarts one.More about the desktop app and
--stop- The desktop app uses a deck that is already running, 4317 first. It replaces that deck only when it is older than the one the app carries.
npx ccdeck --stopstops every deck, the app’s too. The app’s menu then reads No deck running, and the app starts one again only when you click Start the deck.refusing to stop every deck when you asked for one.means the value after--portis missing or is not a port number, so nothing was stopped. Use the port--statusprints.could not stop pid <n> on <port>means that deck was asked, then killed, and is still running.--statusshows what is left.restarting after a crashin--statusis a deck about to come back by itself.--stopstops it too.
-
Read what the deck last wrote
The deck runs in the background and logs what it would print. This shows the last 200 lines.
npx ccdeck --logsLook for two lines:
not registered: no Claude Code events arrive until the deck saysregistered again, which it does by itself.the deck has stopped 5 times in 10 minutes: it kept crashing and stays stopped. Read the lines above it, then runnpx ccdeck.
More about where the log lives
- macOS:
~/Library/Logs/ccdeck - Windows:
%LOCALAPPDATA%\ccdeck\Log - Linux:
$XDG_STATE_HOME/ccdeckor~/.local/state/ccdeck
CCDECK_HOMEmoves it. WithCLAUDE_CONFIG_DIRset, it is theagent-dagfolder inside that one.nothing logged yetmeans no deck has written a log there. The desktop app’s own deck writesdeck-app.loginstead, which--logsdoes not read. -
Check that the deck watches Claude Code and Codex
The deck’s start-up report has a row for each.
skippedmeans it is not watching that one:Claude hooks skipped: start the deck withnpx ccdeck --claude.Codex sessions skipped: setCODEX_HOMEto the folder Codex uses, or start withnpx ccdeck --codex.
One installed later is noticed within about 15 seconds, and the deck restarts to watch it. A Codex session under a
CODEX_HOMEyou set appears once the deck starts with it inCCDECK_CODEX_HOMES.Claude Code only. A deck and a session started with different
CLAUDE_CONFIG_DIRvalues never meet. Start the deck from a shell with the same value as your sessions.More about the other rows, and late sessions
Claude hookswith a path: the hook is written, asagent-dag/hook.jsin the Claude config folder the deck used.Codex sessions watchingwith a folder: the folder the deck reads Codex’s files from.Codex hooks left by an older deck: Codex sessions can arrive twice.npx ccdeck --uninstalltakes those hooks out. It also removes the Claude Code hook and any login item, and stops the deck.npx ccdeckthen writes the hook again, andccdeck --install-serviceputs the login item back.Claude hooks not installed, and the deck stops: it will not rewrite a Claude Codesettings.jsonit cannot read. Fix the file or move it aside, or start withnpx ccdeck --no-claude.
A session already running when the deck started appears the next time it does something, with ? beside its name. A busy one appears at once, also marked restored; for Claude Code, only on macOS and Linux.
-
Check the folder the deck watches
A deck started with
--workspace <path>, or with--scopein a folder, draws only sessions inside that folder.
Demo data The empty canvas of a deck started with --workspace /demo.To watch the whole machine, run
npx ccdeckwith no flags: it replaces the scoped deck. Show one project's Claude Code and Codex sessions has more. -
Open the deck at its address
A tab where no deck answers says Server unreachable, Disconnected from server or Lost connection to the ccdeck server. Run this:
npx ccdeck --ref=guides-troubleshootingIt opens the running deck’s tab, or starts a deck. The address is on its
server readyline. A tab at that address reconnects by itself.More about the port, and too many tabs
The deck asks for port 4317, or the one given with
--portorAGENT_DAG_PORT. It moves only when something that is not one of your decks holds that port, and then tries up to ten random ports from 4318 to 4400. A browser keeps the tour, your panel choices and your text size per address, so they start over on a new one.If no port can be had, the start fails with
all ports tried — none available. On Windows, a reserved port range is the usual cause: the message namesnetsh interface ipv4 show excludedportrange protocol=tcp, and a--portoutside every range it lists gets past it.A tab that says Too many ccdeck tabs are open connects by itself once you close another ccdeck tab: the browser keeps at most six live connections to one address.
-
Check the quota and cost readings
Press U, or click the Usage icon on the stripe on the right. A quota the deck could not read says why.
Demo data Both quotas unread, each with the step that fixes it. The deck’s answer for both quotas was supplied to the page for this picture. Do what the line says, then click the circular arrow in the panel’s header.
Is it you or Claude? When Anthropic or OpenAI reports an incident, a topbar chip, such as Claude · partial outage, says so and links to their status page.
More about the other quota and cost lines
No quota to show.: that Claude Code install signs in with an API key, Bedrock or Vertex, so it has no quota window.Anthropic asked the deck to waitandWaiting for the next allowed readclear by themselves.API-key login: Codex signs in with an API key, which has no ChatGPT quota to show.ChatGPT API unreachablealso shows when the API answers with an error, so it does not prove the network is down.- Usage history (H) says ccusage failed, and which copy: install ccusage yourself, or point
AGENTS_DECK_CCUSAGEat it. - not priced on a card: this build has no published rate for that model, so only its tokens are counted.
- A script that reads the panel’s figures from the deck, such as
/api/quota, gets 401. Send thetokenin~/.claude/agent-dag/<pid>.json, with the pid--statusprints, as anx-ccdeck-tokenheader.
If something goes wrong
The deck is gone after a reboot
A deck run with npx ccdeck never starts at login. Run npx ccdeck again, or npx ccdeck --install once: it installs ccdeck globally and has it start at login. On Linux, it may print sudo loginctl enable-linger $USER: run that yourself, or the deck stops when you log out.
A deck started over ssh stops, or rows say Keychain unreadable
On Windows, the deck ends when the ssh session closes. On a Mac, it cannot open your Keychain, so every account row says Keychain unreadable and a share of accounts fails. Start the deck from a terminal on the machine itself; on Windows, the login item works too.
A setting will not save
Settings › Claude Code says why at the top of its page. For ccdeck’s own, only the Accounts panel’s Local network view and its dialog say why, in a red line. A run of ccdeck with sudo is the usual cause: on macOS, click give it back on that line. Elsewhere, npx ccdeck --logs names the file or folder, and the command that gives back a folder another user owns.
The pill in the topbar reads paused
The canvas is paused, and holds new events until you resume: press Space, or click the pause button in the canvas controls.
Letters like L, U or Space do nothing
Press Cmd + , (Ctrl + , on Windows and Linux) to open Settings, then turn on Single-key shortcuts under Keyboard. If it is on, press Esc first.