Skip to content

[Bug] Worker memory remains high after concurrent resumed sessions #833

Description

@WadohS

Environment

  • CodeNomad 0.20.0 — Tauri, Linux
  • OpenCode 2.0.18

Description

I ran a heavy workload with several worker sessions running simultaneously, including large sessions that were resumed multiple times.

Over time, CodeNomad / its OpenCode workers consumed a significant amount of memory. The important problem is that the memory did not seem to return to a reasonable level after the work had finished.

Restarting or killing the CodeNomad desktop application alone did not reclaim it. The only reliable recovery I found was:

  1. Stop all workers.
  2. Log out of my Linux user session.
  3. Log back in and start CodeNomad again.
  4. Resume the worker sessions.

No session history was intentionally deleted in this process.

Expected behavior

Long-running and concurrent worker sessions should have bounded memory use, or at least release unused memory after they become idle or are stopped. Restarting the desktop client should not leave an unexpectedly large worker memory footprint behind.

Questions / possible improvements

I am not sure whether this is primarily in CodeNomad, the OpenCode V2 shared service, or the interaction between both. Have you already observed a similar problem with many concurrent or resumed worker sessions?

Possible improvements that would help heavy users:

  • explicit per-worker and global memory limits;
  • automatic cleanup/eviction for idle workers and inactive session data;
  • a visible memory usage view per worker/session;
  • a safe UI action to stop unused workers and reclaim their resources without logging out;
  • clearer distinction between closing CodeNomad and stopping the OpenCode worker/service processes.

This may be related to the broader memory-management work discussed in #553, but the reproduction here is specifically multiple simultaneous workers and repeated session resumes on Linux/OpenCode V2.

Thanks again for the great work on CodeNomad. I hope this real-world heavy-workload report is useful.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions