Skip to content
NewsTenslo Code

Tenslo Code quit on busy Macs; here is why and what changed

On 1 December Tenslo Code quit three times in about an hour on one of our Macs; 0.2.22 fixes what we believe is the main cause of the out-of-memory crashes and says on the next launch when the app crashed.

Chart: the main process allocated 168 MB for one agent status change on 0.2.21 and about 1 MB on 0.2.22, on a test bench with state shaped like a real setup.

On 1 December, Tenslo Code quit three times in 66 minutes on one of our Macs, with 10 Claude Code and 12 Codex sessions open. Version 0.2.22 fixes what we believe is the main cause of the first two, so these crashes should stop.

What we saw on 1 December

macOS showed its "Tenslo Code quit unexpectedly" dialog at 13:09, 14:01 and 14:15. The app gave no reason, and the next launch said nothing. The first two were out-of-memory aborts in V8, the JavaScript engine. The third was a different kind of abort, in another thread.

The Mac has 18 GB of memory and was short of it: it had paged out 1.7 million pages since boot, and in the 75 seconds before the third crash macOS added about 10 GB of swap.

What the crash dumps showed

The macOS crash report for 13:09 named the main process and a deliberate abort by V8. The crash dump Electron keeps beside it holds a few crash keys:

  • Reason: "young object promotion failed", during a full garbage collection
  • JavaScript heap in use: 137 MB, against a limit of 4.4 GB (about 3%)
  • Large objects, single allocations over about 128 KB: 114 MB

A crash on 28 November, on version 0.2.16, gave the same reason with 87 MB in use. The heap was far from full. V8 asked the system for more memory while cleaning up, did not get it, and stopped the app.

What we believe is the main cause

A small heap that aborts this way points at garbage: memory allocated and dropped faster than the collector can reclaim it while the Mac swaps. We found one place that did this at scale, and only while a phone is paired. On every change in the app, such as an agent's status or a terminal's details, the phone service asked for each terminal whether the phone can see it. Each answer rebuilt the phone's view of everything, and a check for waiting messages rebuilt it once more per terminal.

On the real app state of that Mac, this listener took 172 ms per change (median); every other listener together took 1 to 2 ms. We then built a test bench on state of the same shape (46 projects on three machines, 245 worktrees, 123 agent terminals): on 0.2.21, the main process allocated 168 MB for each agent status change.

What changed in 0.2.22

The phone's view is built once per change

The phone service now builds one view per change and shares it, and checks waiting messages only for a session that has one. On the same bench, an agent status change now allocates about 1 MB, down from 168 MB. We replayed a flood of updates on a copy of our real app state for 15 seconds: 12 running agents, 32 status changes a second in bursts of 8, and 12 sessions printing 4 KB every 20 ms.

  • Time to handle a change, 99th percentile: 202 ms before, 2.9 ms after
  • Longest event loop delay in main: 1,655 ms before, 31 ms after
  • Garbage collections in 15 seconds: 63 before, 1 after

The heap's peak barely moved (75.5 MB before, 74.5 MB after). The drop in collections points to far less garbage, which is what the crash dumps point at.

Chart of a 15 second flood of updates before and after the fix: time to handle a change at the 99th percentile fell from 202 ms to 2.9 ms, the longest event loop delay from 1,655 ms to 31 ms, and garbage collections from 63 to 1.

One helper process per agent session

Each Claude Code or Codex session used to start three small Node processes for the app's agent, artifact and browser tools. On our Mac, 30 of them held about 500 MB. The agent hub on each machine now serves the first two itself over local HTTP, with a key per session, which leaves one helper. Measured per session on a WSL machine with three idle Claude Code sessions:

  • Processes: 3 before, 1 after
  • Proportional set size: 51.4 MB before, 16.1 MB after

Proportional set size counts shared memory once, split among the processes that share it. With 10 sessions, that is 20 fewer processes and about 350 MB less. We have not measured it on a Mac, and Codex over HTTP was checked only against a test server. Sessions started before the update keep their old helpers.

Chart of helper processes per agent session on a WSL machine with three idle Claude Code sessions: 3 processes and 51.4 MB proportional set size before, 1 process and 16.1 MB in 0.2.22.

On our Mac after the update

We measured the main process on the same Mac with 0.2.21 and then with 0.2.22, sampling its memory footprint, CPU and the app's own log of slow work.

  • Memory footprint: 1,875 to 2,028 MB before, 341 to 500 MB after (mean 1.94 GB and 0.42 GB)
  • CPU, mean: 45% before, 8% after
  • Terminal and status notices that took 20 ms or more: 133 a minute at 152 ms on average before, 0.3 a minute at 24 ms after
  • Stalls: 13 a minute (the worst 628 ms) before, 1 in 15 minutes (343 ms) after

The two runs are not identical. Before, 16 agent sessions ran on the Mac; after, 6 ran on the Mac and about 10 on a WSL machine. The 0.2.21 window was short: 1 3/4 minutes, 1 hour 22 minutes after launch.

Chart of the main process on our Mac: mean memory footprint 1.94 GB on 0.2.21 and 0.42 GB on 0.2.22, mean CPU 45% and 8%, under a similar but not identical load.

What a crash looks like now

If the main process crashes, the next launch says so in a notice, read from the dump the crash left. It reads "Tenslo Code quit unexpectedly at 13:09", or "Tenslo Code quit at 13:09 because the Mac ran out of memory" when the dump shows an out-of-memory abort. On Windows and Linux it says "the computer", and when the app filled its own heap it says "it".

A notice in Tenslo Code: Tenslo Code quit at 13:09 because the Mac ran out of memory, with Show log and Report.
  • Show log opens the app log, which has one line for each crash with its keys.
  • Report opens a new GitHub issue filled in with the version, system version, process type, time and crash keys. You decide whether to submit it.

Nothing is uploaded. The dump stays on your computer, and only five keys are read out of it, each checked so that no file path or user name reaches the issue. The app keeps the newest five dumps. A crash of a window or the GPU process is only logged. We checked the notice end to end on WSL with a real out-of-memory dump, not yet on macOS or Windows.

What we are still measuring

We do not claim the crashes are gone, and we keep measuring 0.2.22 on real machines. One question is open: after a relaunch, the main process grew about 1 MB a second (1.1 GB after 3 minutes, 1.86 GB after 10). Our best suspect is the queue of updates waiting to go to other machines over SSH, which had no limit. In the harness, a link that stopped reading held 27 MB after 3,000 changes, growing in a straight line. Nothing from our Mac ties it to the growth yet.

Shipped in 0.2.23:

  • A cap on that queue: while a link is behind, waiting updates merge into one, and past 128 MB the link restarts and resyncs.
  • The phone's view built only while a message to the phone waits: about 140 KB allocated per agent status change on the same bench, against about 1 MB in 0.2.22.
  • Main's memory written into the crash keys every minute, so the next report shows what grew.
  • A Send report button on the crash notice that sends one cleaned copy of the dump, with no account attached, and only when you press it.

Also in this release

  • Tables filter by column, by picked values or by text, count the rows shown and clear every filter in one click.
  • A project lists every agent tab of every worktree, stopped ones last.
  • In the preview, an agent's keys reach the page, and a new tab keeps its address field focused.
  • Setup health no longer offers retired-plugin leftovers, writes a changed skill copy again, and no longer reports Grok's listed marketplaces missing.
  • Tenslo Code has its own icon.

The full notes are in the changelog.

Share

Try Tenslo Code.

Free during early access, on macOS, Windows and Linux.