Session is Busy Error Message
While working in a long session, I get an error that says "Error: Session session_id is busy", but my chat is not "working..." and I can still run /compact on the session. I assume there is a mechanism that isn't quite updating that the session is actually unlocked now. Here are some logs and a screenshot that might be useful. This is on a Mac, but if there are any other things that might help reproduce this please let me know -- I can add more details.
INFO 2025-07-08T14:44:33 +0ms service=session sessionID=ses_815a2734cfferqJAknKIO6uGQ6 unlocking
INFO 2025-07-08T14:44:33 +0ms service=bus type=session.idle publishing
INFO 2025-07-08T14:44:33 +0ms service=server duration=20443 response
INFO 2025-07-08T14:44:41 +7942ms service=server method=GET path=/find/file request
INFO 2025-07-08T14:44:41 +33ms service=server duration=32 response
INFO 2025-07-08T14:44:41 +179ms service=server method=GET path=/find/file request
INFO 2025-07-08T14:44:41 +12ms service=server duration=12 response
INFO 2025-07-08T14:44:41 +5ms service=server method=GET path=/find/file request
INFO 2025-07-08T14:44:41 +17ms service=server duration=16 response
INFO 2025-07-08T14:44:42 +104ms service=server method=GET path=/find/file request
INFO 2025-07-08T14:44:42 +10ms service=server duration=10 response
INFO 2025-07-08T14:44:42 +50ms service=server method=GET path=/find/file request
INFO 2025-07-08T14:44:42 +10ms service=server duration=9 response
INFO 2025-07-08T14:44:42 +51ms service=server method=GET path=/find/file request
INFO 2025-07-08T14:44:42 +8ms service=server duration=8 response
INFO 2025-07-08T14:44:42 +197ms service=server method=GET path=/find/file request
INFO 2025-07-08T14:44:42 +11ms service=server duration=11 response
INFO 2025-07-08T14:44:42 +35ms service=server method=GET path=/find/file request
INFO 2025-07-08T14:44:42 +10ms service=server duration=9 response
INFO 2025-07-08T14:44:44 +1654ms service=server method=POST path=/session/ses_815a2734cfferqJAknKIO6uGQ6/message request
INFO 2025-07-08T14:44:44 +0ms service=session sessionID=ses_815a2734cfferqJAknKIO6uGQ6 locking
INFO 2025-07-08T14:44:44 +0ms service=session session=ses_815a2734cfferqJAknKIO6uGQ6 chatting
INFO 2025-07-08T14:44:44 +4ms service=session sessionID=ses_815a2734cfferqJAknKIO6uGQ6 locking
INFO 2025-07-08T14:44:44 +0ms service=session sessionID=ses_815a2734cfferqJAknKIO6uGQ6 unlocking
INFO 2025-07-08T14:44:44 +1ms service=bus type=session.idle publishing
INFO 2025-07-08T14:44:44 +0ms service=server duration=5 response
INFO 2025-07-08T14:44:58 +14312ms service=bus type=* unsubscribing
INFO 2025-07-08T14:44:58 +0ms service=server event disconnected
INFO 2025-07-08T14:44:58 +3ms service=app name=lsp shutdown
INFO 2025-07-08T14:44:58 +0ms service=lsp.client serverID=golang shutting down
INFO 2025-07-08T14:44:58 +0ms service=lsp.client serverID=golang shutdown
INFO 2025-07-08T14:44:58 +0ms service=app name=file.watcher shutdown
INFO 2025-07-08T14:44:58 +0ms service=app name=session shutdown
same
Same:
failed to send message: POST
"http://127.0.0.1:59808/session/ses_81edb10f7ffedc
vbJvp8MW4xrJ/message": 400 Bad Request
{"name":"UnknownError","data":{"message":"Error:
Session ses_81edb10f7ffedcvbJvp8MW4xrJ is busy"}}
No further messages are sending. I've restarted opencode, using v0.2.13
Yep, same here
Same here, sharing in case it's useful.
- Long session
- Still see the error after existing and starting
opencodeagain
same error here, I've gotten this message during multiple sessions today. v0.2.6 ... generally pops up after long sessions, but it happens regardless of how long its been since my last message -- I'm not trying to ask questions while a response is being generated.
Generally resolved with /new , but session context is lost
I wonder if this has anything to do with this open issue...? Any chance the session isn't actually being released in some instances, leading to a memory leak? https://github.com/sst/opencode/issues/804#issue-3216651391
Got the same on 0.2.18, claude-opus-4-20250514.
Noticed it in two sessions, both were long, certainly at more than 60% context.
fixed in v0.2.19
Unfortunately, I still see this when I'm trying to add a message to the queue.
Btw., I can't interrupt it while it's working - that's why I even tried to queue up a message. But I get that "session is busy" message, and I have to wait for it to finish the work it's doing until I can continue prompting.
I'm on version 0.2.20.
v0.2.27 — also can't queue a message while it's working (sonnet 3.7 via bedrock)
Should I create a new issue for this? I can't add a message to the queue.
If there's no ability to queue messages (or an intent to support that feature), maybe we should be forced to interrupt the session before being able to type into the textarea.
I'm on version 0.3.18, Claude Sonnet 4.
we're going to add queueing, just haven't gotten to it yet