Show one project's Claude Code and Codex sessions
To show only one project's sessions, start ccdeck in its folder with npx ccdeck --scope, or from anywhere with npx ccdeck --workspace <path>: the deck then draws only the Claude Code and Codex sessions in that folder or under it, and a plain npx ccdeck watches every folder again.
You will
- Start a deck that watches one folder
- Check which folder it watches
- Learn what the folder does not filter
- Go back to every session
Before you start
- Node.js 18 or newer, and Claude Code, Codex, or both.
- A terminal open in the project’s folder, or the folder’s path.
Steps
-
Start the deck for one folder
In a terminal in the project’s folder, run:
npx ccdeck --scope --ref=guides-one-projectOr name the folder from any terminal:
npx ccdeck --workspace ~/code/web-api. The deck captures the sessions in that folder or any folder under it.This stops a deck that watches every folder. Only one deck runs at a time. Step 6 brings it back.
More about the folder
- With both flags,
--workspacewins. - A relative path is read against the folder you run the command in, and links are followed. A folder that does not exist yet is accepted.
- Put a path with a space in quotes. A
~inside the quotes is not expanded, so write"$HOME/code/web api". - Letter case is ignored on macOS and Windows. On Linux, a folder whose name differs only in case is another folder.
- Nothing in the page changes the folder. To watch another, start the deck again with that folder.
- One deck runs at a time for each
CLAUDE_CONFIG_DIRyou run Claude Code with.
- With both flags,
-
Check which folder the deck watches
The terminal report’s first row,
workspace, names the folder.(all)there means every folder. The new browser tab names it too, until a session in the folder is drawn.
Demo data The deck watches /demo.After that, the page no longer names the folder.
npx ccdeck --statusprints it from any terminal.To come back to this deck, run the same command. The report says
ccdeckbrings this deck back. Here it does not: a plainnpx ccdeckreplaces it with a deck for every folder.More about the report
- When the start stopped another deck, the first line says so:
stopped the deck on 4317 · pid … · it was started with different settings. - The folder is absolute, with links followed.
- Running the command for the same folder again prints
deck already runningand opens the deck’s tab. --statusnever marks a deck for one folderopens this one, because a plain start would replace it.- The new tab first replays the sessions the log holds from the folder, and none from other folders.
- When the start stopped another deck, the first line says so:
-
Start a session in the folder
Run
claudeorcodexin the folder, or in any folder under it. The session appears as on any deck. A session outside the folder never reaches the deck: it is not drawn, not written to the log, and plays no tone.A session already working in the folder when the deck starts appears marked restored, a Claude Code one only on macOS and Linux. Any other session that was already running appears the next time it does something. Both are marked ? and ≥.
More about which sessions reach the deck
The ? sits beside the session’s name and the ≥ before its time, because the deck did not see it begin. A restored card leaves out the tool calls made before the deck started. Restore unfinished sessions, in Settings › General, turns restoring off for each CLI.
Claude Code and Codex are filtered in different places. Claude Code: ccdeck’s hook still runs for every session on the machine, and sends each event only to a deck whose folder holds the session’s folder. Codex: the deck reads the folder recorded at the top of each new rollout file, and does not read a file whose folder is outside its own.
-
Know what the folder does not filter
- The Usage panel’s today, month and all figures and the Usage history dialog (H) come from ccusage, which covers sessions in every folder.
- Accounts, quota windows and the This machine panel are the same as on a deck that watches every folder.
- Tool activity and Skill activity, on the stripe on the right, show the history ccdeck keeps on this machine, other folders’ calls included; this deck adds only its folder’s.
Clearing empties the whole log. With the default log, clearing the canvas (C) also erases what the log holds for other folders. The dialog, Clear the deck?, does not mention them. Step 5 gives the deck a log of its own.
-
Give the deck its own log, if you want one
npx ccdeck --scope --history ~/web-api-events.jsonl --ref=guides-one-projectThe deck then reads and writes that file in place of the default log, so clearing empties only that file. To come back to this deck later, run the whole command again,
--historyincluded.More about the log
- The report’s
logrow names the file. - While this deck runs, the folder’s sessions are not written to the default log. A deck that later watches every folder does not replay them.
--no-persistkeeps no log at all.- The log file is part of what a start compares, and so is a port asked for with
--port. A start with another file or port stops the running deck: it does not run beside it.
- The report’s
-
Go back to every session
Run the deck with no folder flag:
npx ccdeck --ref=guides-one-projectIt stops the deck for one folder and starts one whose
workspacerow reads(all). Sessions that ran outside the folder while only that deck was up were never recorded, and do not come back.More about going back
- The report shows the same
stopped the deck on …line.npx ccdeck --statusnow marks the deckopens this one. --allis accepted and changes nothing: a plain start already watches every folder.- The new deck replays the default log, up to its newest 2,000 hook events. Sessions still running appear as in step 3.
- See Claude Code subagents and tool calls live says what a restart brings back.
- The report shows the same
If something goes wrong
The canvas stays empty and names a folder
The session runs outside that folder: a sibling such as ~/code/web-api-v2 is outside ~/code/web-api. Start the session inside the named folder, or run npx ccdeck to watch every folder.
The workspace row reads (all), or only part of your path
The value after --workspace was empty, for example a shell variable that was not set, or a path with a space was not quoted. The report warns missing value or unknown option. Start again with a real path, in quotes.
An open tab shows other folders, or says Lost connection
A tab from the stopped deck keeps what it had drawn: reload it. If it keeps saying Lost connection, the new deck runs on another port. Close the tab, and open the address npx ccdeck --status prints.
After a reboot the deck watches every folder again
The deck that starts at login is always started without a folder. Run npx ccdeck --scope in the folder again.
The report says could not stop the deck on 4317
The running deck did not stop in time, and the new deck may run beside it on another port. Run npx ccdeck --stop, which stops every deck, then start the deck for your folder again.
Something else? See Troubleshoot ccdeck: status, logs, port and hooks.