claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

We need to be able to monitor multiple sessions at once

Open krisajenkins opened this issue 8 months ago • 4 comments

A lot of us are running multiple claude sessions in parallel. Sometimes multiple sessions for multiple projects. (That's a testament to how amazingly useful this tool is!) But it's reached the point where I seem to spend a chunk of time flipping between tabs, just checking for which sessions are blocked waiting for my input.

We need some way of monitoring multiple sessions at a glance, and seeing which ones are blocked.

There are lots of ways you could tackle that, but here's a small suggestion that I think would be really easy to implement: add a stop_reason: "prompt" event to the event log in ~/.claude/projects/<dir>/<session>.jsonl. Every time claude-code needs to prompt the user for input, emit a JSON packet like:

{
   "message": {
    "content": [
      {
        "text": "Would you like me to create that file?",
        "type": "text"
      }
    ],
    "stop_reason": "prompt",
  },
  "type": "assistant",
   ...
}

If you do that, it would be possible to write something that can monitor all sessions and detect which ones are blocked, and then the community can take over from there.

(In fact, I'll make you a promise - if you add an event like that, I'll release a monitoring tool by the end of the next business day. I've already got the prototype built, and just got blocked on the fact that there's no way to reliably determine which sessions are blocked. 😁)

krisajenkins avatar Jun 27 '25 06:06 krisajenkins

Adding a screenshot of the prototype, just to prove I mean it. 😁

Image

krisajenkins avatar Jun 27 '25 07:06 krisajenkins

Yes please!!

commandodev avatar Jun 27 '25 07:06 commandodev

+1

martintrojer avatar Jun 27 '25 07:06 martintrojer

Please! It's not good for my mental health to sit flipping between tabs all day 😭

shmish111 avatar Jun 27 '25 08:06 shmish111

@krisajenkins it's not exactly what you are asking for, but you can configure your terminal to notify you when input is needed.

claude config set --global preferredNotifChannel terminal_bell

abrinsmead avatar Jun 30 '25 22:06 abrinsmead

As of v1.0.38, you should now be able to implement this with a Notification hook. Review https://docs.anthropic.com/en/docs/claude-code/hooks

dicksontsai avatar Jul 01 '25 00:07 dicksontsai

Amazing, thanks @dicksontsai! Not how I imagined it, but far more flexible, I'm impressed. 🙂

It'll take me a bit of rejigging tomorrow but hopefully I can publish my tool soon. Thanks. 👍

krisajenkins avatar Jul 01 '25 16:07 krisajenkins

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Aug 10 '25 14:08 github-actions[bot]