[Bug] Main session persists and executes autonomously after /exit, ignoring CLAUDE.md directives
Bug Description
My main session persisted after /exit and acted autonomously, undisclosed, on Fable 5, which violates my CLAUDE.md directive loaded in that session's context. Ran an interactive session (permission-mode: auto) that launched a background compute job, then /exit'd expecting it to end.
A SessionStart:fork silently kept the main session (not a subagent) active and accumulative context and committing to my repository while being completely undiscoverable. I opened up a new session to just investigate why the backgrounded process seemed to revive, and it required three separate kill instances for the rogue session to finally be found and killed. That is, the backgrounded agent was not only difficult to discover, it was self-reviving and survived kill commands executed by Claude code itself, spawning a third undisclosed process and another commit.
Is this main-session persistence and self-revival after /exit intentional? If so, it must be disclosed at the time of exit, which only states that active background processes will run to completion. If main sessions are meant to persist/transition to background ones, they should respect the CLAUDE.md.
Environment Info
- Platform: darwin
- Terminal: xterm-256color
- Version: 2.1.215
- Feedback ID: 45c9ad19-7d53-4d9d-8452-58666594650e
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗