Skip to content

[BUG] Claude Code v1.0.53 allocating >120GB VM and 44GB physical memory and getting OOM killed #3643

Closed as duplicate

Description

@mark-99

Claude Code v1.0.53 is frequently and apparently randomly using excessive amounts of memory and getting OOM killed.

analyze this dmesg

    ```[6746807.992310] [1661706]  1000 1661706  2945110    58453  9555968        0             0 node
    [6746807.992312] [1708298]     0 1708298   696366     5064   471040        0          -500 dockerd
    [6746807.992315] [1717450]  1000 1717450  8214417    30402  3702784        0             0 node
    [6746807.992316] [1721397]  1000 1721397 33547921 11490051 99647488        0             0 claude
    [6746807.992318] [1732461]     0 1732461     3860     1013    73728        0             0 sshd
    [6746807.992320] [1732462]   109 1732462     3860      681    77824        0             0 sshd
    [6746807.992322] [1734802]     0 1734802     3860     1108    73728        0             0 sshd
    [6746807.992324] [1734813]  1000 1734813      698      248    49152        0             0 sleep
    [6746807.992326] [1734836]   109 1734836     3860      695    73728        0             0 sshd
    [6746807.992328] [1735021]  1000 1735021      723      221    49152        0             0 sh
    [6746807.992330] [1735022]  1000 1735022     1091      495    53248        0             0 cpuUsage.sh
    [6746807.992332] [1735025]  1000 1735025     1548      181    49152        0             0 sleep
    [6746807.992334] [1735030]  1000 1735030      698      244    40960        0             0 sleep
    [6746807.992336] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=tailscaled.service,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1000.slice/session-c88.scope,task=claude,pid=1721397,uid=1000
    [6746807.992366] Out of memory: Killed process 1721397 (claude) total-vm:134191684kB, anon-rss:45957644kB, file-rss:2560kB, shmem-rss:0kB, UID:1000 pgtables:97312kB oom_score_adj:0

● This is an Out of Memory (OOM) kill event. The system killed the claude process (PID 1721397) because it was consuming excessive memory.

Key details:

  • Process killed: claude (PID 1721397, UID 1000)
  • Memory usage: 134,191,684 kB (128 GB) virtual memory, 45,957,644 kB (44 GB) resident memory
  • Reason: System ran out of memory (global OOM)
  • Time: 6746807.992366 seconds since boot

The process list shows claude was by far the largest memory consumer. Other processes like node and dockerd were using much less memory. The OOM killer selected claude as the best candidate to free up memory and keep
the system operational.

Activity

  1. mark-99 commented on Jul 16, 2025

    @mark-99
    Author

    I did install this checkpoint util recently, and I was accessing some large log files, and I see it's inserted a hook, so that's a possibility.

    claude-code-checkpoint

    Here's my full settings.json

      "permissions": {
        "additionalDirectories": [
          "/home/ubuntu/fogo-dev/"
        ],
        "allow": [
          "Bash(*)",
          "Bash(cd:*)",
          "Bash(grep:*)",
          "Bash(ls:*)",
          "Bash(mkdir:*)",
          "Bash(chmod:*)",
          "Bash(find:*)",
          "FileSystem(read:*)",
          "FileSystem(write:*)",
          "FileSystem(create:*)",
          "FileSystem(path:*)",
          "FileSystem(temp:*)",
          "Network(*)",
          "Network(curl:*)",
          "Network(wget:*)",
          "Network(download:*)",
          "WebSearch(*)",
          "PackageManager(npm:*)",
          "PackageManager(pip:*)",
          "PackageManager(yarn:*)",
          "PackageManager(apt:*)",
          "PackageManager(brew:*)",
          "PackageManager(conda:*)",
          "Git(*)",
          "Docker(*)",
          "Process(start:*)",
          "Process(kill:*)",
          "Process(restart:*)",
          "Environment(*)",
          "SystemInfo(*)",
          "Python(*)",
          "Node(*)",
          "Testing(*)",
          "Build(*)",
          "Deploy(*)"
        ],
        "deny": [
          "Bash(rm:-rf)",
          "Bash(sudo:rm)",
          "Bash(sudo:rmdir)",
          "FileSystem(delete:/)",
          "FileSystem(delete:/home)",
          "FileSystem(delete:/etc)",
          "FileSystem(delete:/usr)",
          "FileSystem(delete:/var)",
          "FileSystem(delete:/sys)",
          "Process(kill:1)",
          "Process(kill:init)",
          "Bash(ssh:*)"
        ]
      },
      "hooks": {
        "Stop": [
          {
            "matcher": "",
            "hooks": [
              {
                "type": "command",
                "command": "/home/ubuntu/.claude/checkpoint/hooks/checkpoint-hook.sh"
              }
            ]
          }
        ]
      }
    }```
    
  2. mark-99 commented on Jul 16, 2025

    @mark-99
    Author

    So downgraded to 1.0.52 and I didn't have any problems.

    I uninstalled the checkpoint util (hook was removed from the settings.json), upgraded to 1.0.53 and it OOMed again:

    [6752564.571263] Out of memory: Killed process 2028082 (claude) total-vm:133718668kB, anon-rss:44305312kB, file-rss:2444kB, shmem-rss:0kB, UID:1000 pgtables:94080kB oom_score_adj:0

  3. mark-99 commented on Jul 16, 2025

    @mark-99
    Author

    Happening on 1.0.52 also :/

    [6765346.302450] Out of memory: Killed process 2771512 (claude) total-vm:133667540kB, anon-rss:43819888kB, file-rss:2512kB, shmem-rss:0kB, UID:1000 pgtables:91360kB oom_score_adj:0
    [6765348.422935] oom_reaper: reaped process 2771512 (claude), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
    [6765348.674214] [UFW BLOCK] IN=bond0 OUT= MAC=7c:c2:55:e4:34:28:74:83:ef:9e:f1:42:08:00 SRC=109.205.213.29 DST=64.130.57.43 LEN=40 TOS=0x00 PREC=0x00 TTL=244 ID=33624 PROTO=TCP SPT=44271 DPT=37282 WINDOW=1024 RES=0x00 SYN URGP=0 
    [6765371.025949] [UFW BLOCK] IN=bond0 OUT= MAC=7c:c2:55:e4:34:28:74:83:ef:9e:f1:42:08:00 SRC=45.140.17.26 DST=64.130.57.43 LEN=52 TOS=0x02 PREC=0x00 TTL=120 ID=20627 DF PROTO=TCP SPT=8543 DPT=25 WINDOW=64240 RES=0x00 CWR ECE SYN URGP=0 
    [6765387.050351] [UFW BLOCK] IN=bond0 OUT= MAC=7c:c2:55:e4:34:28:98:5d:82:0e:67:13:08:00 SRC=45.140.17.26 DST=64.130.57.43 LEN=52 TOS=0x00 PREC=0x00 TTL=120 ID=20633 DF PROTO=TCP SPT=40413 DPT=3389 WINDOW=64240 RES=0x00 SYN URGP=0 
    $ 
    $ claude --version
    1.0.52 (Claude Code)
    
  4. mark-99 commented on Jul 18, 2025

    @mark-99
    Author

    Reverted further to 1.0.51 and no issues in the last 24 hours.

  5. bcherny commented on Jul 27, 2025

    @bcherny
    Collaborator

    Actively working on squashing memory leaks!

  6. github-actions commented on Aug 5, 2025

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  7. locked as resolved and limited conversation to collaborators on Aug 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions