t3code icon indicating copy to clipboard operation
t3code copied to clipboard

[Bug]: Nightly - OpenCode integration on Linux launches extra opencode executables while idle

Open renderful opened this issue 7 months ago • 6 comments

Before submitting

  • [x] I searched existing issues and did not find a duplicate.
  • [x] I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

I ran the appimage and used opencode for one session and went to do other things, and while it is sitting I can see that every 1-2 minutes a new .opencode executable is launched. 12 have been launched so far.

Expected behavior

It should only have 1 opencode executable per session

Actual behavior

12 opencode executables are launched

Impact

Blocks work completely

Version or commit

No response

Environment

No response

Logs or stack traces


Screenshots, recordings, or supporting files

image.png

Workaround

No response

renderful avatar Apr 18 '26 04:04 renderful

hmm those are health probes but they should close? will look into it

juliusmarminge avatar Apr 18 '26 04:04 juliusmarminge

I think these are all spawned by t3 code for me as well?

Image

taroj1205 avatar Apr 18 '26 05:04 taroj1205

Yee that should not happen

juliusmarminge avatar Apr 18 '26 06:04 juliusmarminge

Same issue here on macOS 26 with latest nightly sir 🙏🏻

Image

maddada avatar Apr 18 '26 14:04 maddada

also hitting this on Linux (Arch), nightly. dug into the logs a bit in case it helps

reproduced on a fresh system, only used t3code (didn't use anything else that spawns opencode or use opencode itself). processes just stacked up and never died. one hit 4.1 GB, 9+ running at once.

Image

found a few things in ~/.t3/userdata/logs/server-child.log:

stop signals fire but never reach the process [14:28:02.995] WARN: provider command reactor failed to process event eventType: 'thread.session-stop-requested' cause: "ProviderValidationError: Cannot route thread 'f34b4e4a-...' because no persisted provider binding exists." happens for multiple threads

restarts spawn a new process without killing the old one [12:24:44.268] INFO: provider command reactor restarting provider session reason: 'startSession called with existing active session'

opencode.json cache write failing right before the binding errors PlatformError: NotFound: FileSystem.rename (opencode.json.8471.tmp -> opencode.json) ENOENT: no such file or directory not sure if this is the root cause but it shows up before the routing errors — maybe the binding never gets persisted so stopSession can't find it

workaround: pkill -f "opencode serve" once ram usage is getting noticably high

edit: Note running the above kills any running generations and the context is full lost for that conversation

hope it helps!

semyonfox avatar Apr 18 '26 15:04 semyonfox

@juliusmarminge Hope you can take a look at my small PR to fix this 🙏🏻 https://github.com/pingdotgg/t3code/pull/2178

maddada avatar Apr 18 '26 17:04 maddada