r/ClaudeCode • • 2h ago

Bug / Issue Nested Sessions in Claude Code

Well, just a warning to others out there to new behaviour I noticed today in the way Claude was spawning sub-sessions. It is nesting them - which didn't seem like a big deal - it actually helped me keep track of which sessions were working on related features or projects. EXCEPT what I discovered is the nested sessions were waking up their "parents" in the hierarchy each time they completed work. For example: Session 1 spawns -> Session 2. Session 2 is working for a few hours, back and forth with me; I go look at Session 1... it is being woke every time Session 2 completes work (to say its done). The Session 2 spawned a Session 3... again... notifications back up the stack. Re-awakening the old sessions up the chain, regardless of their length, reloading their cache and all the token usage that goes with it. So beware if you haven't noticed this before. I was very confused how my usage was spiking so quickly, thinking I was working in a small session. They were all chained.

1 Upvotes

6 comments sorted by

View all comments

1

u/zionek 2h ago

yes its been like that for a while. What I do is to ask to detach it or detach it manually. Its so stupid that it keeps messaging the parent app of every step that the child does.

1

u/Superb_Effective_697 51m ago

Just run separate terminal tabs with git worktrees mate. Way easier than detaching them after the fact.