claude-code - 💡(How to fix) Fix Prevent archiving (and deleting) of pinned sessions in CCD

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Fix Action

Fix / Workaround

Current workaround

RAW_BUFFERClick to expand / collapse

Request

When a session is pinned in the CCD session list, both the Archive and Delete items in its context menu should refuse the action — either grey them out, hide the keyboard shortcuts (A / D), or require an explicit Unpin first. The same refusal should apply to the mcp__ccd_session_mgmt__archive_session MCP tool.

Why

"Pinned" already communicates this matters to me, keep it visible. With the current menu, a pinned session is one stray A (Archive) or D (Delete) keypress away from disappearing — there's no safeguard. Archive is recoverable, Delete much less so.

Bonus: expose isPinned on the MCP API

mcp__ccd_session_mgmt__list_sessions currently returns only sessionId, title, cwd, isArchived, isRunning, lastActivityAt. Pin state isn't visible to MCP consumers, so:

  • archive_session can't natively short-circuit on pinned sessions
  • Hook-based or skill-based side-rails (e.g. a user-maintained pinned-sessions.json allowlist) have to duplicate state and inevitably drift from CCD's real pin attribute

Surfacing isPinned on the list response would let the MCP tool refuse pinned sessions itself, and would unblock community-built guards while the UI-level change is in flight.

Current workaround

For the MCP-tool path only, a PreToolUse hook on mcp__ccd_session_mgmt__archive_session reading a side-file of pinned sessionIds works today — but it can't intercept the in-app menu, and the side-file drifts from CCD's actual pin state unless manually kept in sync. The right home for this rule is CCD itself.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Prevent archiving (and deleting) of pinned sessions in CCD