CCD: sessions auto-archive on PR merge without user action

Status Open
Maintainer reply None cached
Activity 1 comment · opened Sep 2, 2026

Summary

Claude Code Desktop (CCD) is auto-archiving sessions as soon as their associated pull request merges, with no user action taken. This violates the user's expectation that session archiving is a manual, user-only action — nothing in the invoking repo's hooks, scheduled tasks, or skills calls archive_session.

Reproduction / evidence

Observed live on 2026-09-02 (all times UTC). Using mcp__ccd_session_mgmt__list_sessions with include_archived: true, three sessions flipped from isArchived: false to isArchived: true within a ~16-minute window, each immediately after its PR merged:

| Session title | Sidebar group | PR | PR state | Archived at |
| --- | --- | --- | --- | --- |
| CR homepage section/facet review | CallReports | #6953 | MERGED | 2026-09-02T20:20:13.797Z |
| GitHub usage analysis | Luminate | #7002 | MERGED | 2026-09-02T20:04:44.158Z |
| LM lender alignment and color scheme | LenderMatch | #7004 | MERGED | 2026-09-02T19:38:02.798Z |

No user interaction with the app was reported at the time each archive happened — the user was working in an unrelated session in a different worktree and only noticed after the fact via a proactive watchdog check.

Investigation already done (ruling out repo-side automation)

  • Grepped every file under the local ~/.claude tree (hooks, scheduled tasks, skills, memory) for archive_session. The only matches are:
  • A scheduled task previously found to call it (session-janitor), which was retired to a no-op stub prior to this incident and confirmed absent from the live scheduler (mcp__scheduled-tasks__list_scheduled_tasks).
  • A read-only watchdog task (session-archive-watch) that only reads archive state and never calls archive_session.
  • Confirmed via list_scheduled_tasks that no currently-enabled scheduled task references archiving.
  • The 100% correlation between "PR just merged" and "session archived within minutes" across three unrelated sessions/repos/worktrees points to client-side (CCD app) behavior tied to PR-merge detection, not anything scriptable/controllable from the repo.

Expected behavior

Session archiving should only happen when the user explicitly archives a session (via the UI, or an agent tool call the user approved). Detecting that a session's PR has merged is a reasonable signal to suggest archiving, but should not auto-archive without confirmation.

Environment

  • Claude Code Desktop (CCD), Windows 11
  • Reported by the user directly; investigated via an active Claude Code session in C:\Luminate

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗