pingdotgg / pingdotgg/t3code

[Bug]: MCP plugin processes (bun server.ts) are never killed when closing conversations

Open
#3,089 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs-triage
Dominant language
TypeScript
Stars
23k
Forks
5.9k
Avg merge
11h 14m
Merged PRs (30d)
357

Description

Before submitting
  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.
Area

apps/web

Steps to reproduce
  1. Install the Telegram plugin (telegram@claude-plugins-official 0.0.6)
  2. Open a conversation — a bun server.ts process spawns for the plugin's MCP server (cwd: ~/.claude/plugins/cache/claude-plugins-official/telegram/0.0.6/)
  3. Close or delete that conversation
  4. The bun server.ts process is still running (ps aux | grep 'bun server.ts')
  5. Repeat: open and close ~10 conversations
  6. Verify with ps aux | grep -c 'bun server.ts' — 10+ orphaned processes exist
  7. Note: pkill -f 'bun server.ts' (SIGTERM) doesn't work — T3 Code respawns them immediately. Only kill -9 works.
Expected behavior

Closing or deleting a conversation should kill the MCP plugin processes it spawned. Only conversations currently open should have a running bun server.ts process.

Actual behavior

Major degradation or frequent failure — after ~100 conversations, orphaned processes consume 3.5+ GB RAM and 500%+ CPU, making the machine unusable. Observed on two separate Apple Silicon Macs simultaneously.

Impact

Major degradation or frequent failure

Version or commit

0.0.27

Environment

macOS 26.4.1 (Darwin 25.4.0), Apple Silicon (arm64) T3 Code Alpha 0.0.27 (desktop app) Bun 1.3.11 Node v25.9.0 Plugin: telegram@claude-plugins-official 0.0.6 Reproduced on MacBook Air M3 and Mac mini M4 Pro

Logs or stack traces
# All orphaned processes share the same cwd (the Telegram plugin):
$ lsof -p <any_pid> | grep cwd
bun  <pid>  zordor  cwd  DIR  ~/.claude/plugins/cache/claude-plugins-official/telegram/0.0.6

# Snapshot after ~2 hours of normal use (open/close conversations):
$ ps aux | grep 'bun server.ts' | grep -v grep | awk '{printf "PID %-6s CPU %5s%% RSS %6s KB\n", $2, $3, $6}'
PID 25947  CPU  98.7% RSS 135568 KB
PID 53913  CPU  63.8% RSS 136000 KB
PID 14528  CPU  63.6% RSS 119856 KB
PID 76552  CPU  63.3% RSS 126912 KB
PID 3212   CPU  62.8% RSS 115632 KB
PID 29467  CPU  62.6% RSS 124112 KB
PID 89087  CPU  62.4% RSS 129184 KB
PID 50608  CPU  62.3% RSS 124896 KB
PID 32273  CPU  62.0% RSS 136720 KB
PID 91222  CPU  61.9% RSS 104912 KB
PID 33374  CPU  61.9% RSS 138992 KB
PID 92124  CPU  61.3% RSS 141216 KB
PID 1935   CPU  60.0% RSS 136560 KB

# Summary: 13 orphaned processes | 1.6 GB RSS | 846% CPU
# Earlier session peaked at 105 processes | 3.6 GB RSS | 613% CPU

# SIGTERM doesn't work — T3 Code respawns immediately. Only SIGKILL stops them:
$ pkill -f 'bun server.ts'     # processes come right back
$ pkill -9 -f 'bun server.ts'  # actually kills them
Screenshots, recordings, or supporting files

No response

Workaround

Kill all orphaned processes (must use -9, SIGTERM is ineffective):

pkill -9 -f 'bun server.ts'

Or to run periodically, add to crontab (every 30 min):

*/30 * * * * pkill -9 -f 'bun server.ts' 2>/dev/null

Permanent fix: disable the Telegram plugin from the T3 Code UI

(Settings → Plugins). Editing installed_plugins.json manually

doesn't work — T3 Code re-adds the plugin within seconds.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in apps/web by tracing how MCP plugin processes such as bun server.ts are spawned and associated with a conversation. Reproduce by opening and closing conversations, then verify that closing or deleting one terminates its process without respawning while still-open conversations continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
bun, node.js, typescript
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.