[BUG] Debug log spam, 1M lines from 12k, datadog connection failure, when swapping
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When memory was low, some swap space used, connections to datadog hq failed in a fast loop, growing the debug log from ~12k lines to 1.2M, and compounding the memory issues.
11497 2026-03-12T19:51:32.218Z [DEBUG] Version 2.1.74 already installed, updating symlink
11498 2026-03-12T19:51:32.218Z [DEBUG] Created directory /Users/user/.local/bin for symlink
11499 2026-03-12T19:51:32.218Z [DEBUG] Successfully updated to version 2.1.74
11500 2026-03-12T19:51:32.220Z [DEBUG] Fast mode unavailable: Fast mode requires extra usage billing · /extra-usage to enable
11501 2026-03-12T19:51:32.260Z [DEBUG] Protecting locked version from cleanup: 2.1.73
11502 2026-03-12T19:51:32.729Z [DEBUG] Stream started - received first chunk
11503 2026-03-12T19:51:32.948Z [DEBUG] Detected change to /Users/user/.claude/settings.json
11504 2026-03-12T19:51:32.972Z [DEBUG] Getting matching hook commands for ConfigChange with query: user_settings
11505 2026-03-12T19:51:32.972Z [DEBUG] Found 0 hook matchers in settings
11506 2026-03-12T19:51:32.972Z [DEBUG] Matched 0 unique hooks for query "user_settings" (0 before deduplication)
11507 2026-03-12T19:51:33.103Z [DEBUG] Settings changed from userSettings, updating app state
11508 2026-03-12T19:51:33.117Z [DEBUG] Replacing all allow rules for destination 'userSettings' with 0 rule(s): []
11509 2026-03-12T19:51:33.117Z [DEBUG] Replacing all deny rules for destination 'userSettings' with 0 rule(s): []
11510 2026-03-12T19:51:33.117Z [DEBUG] Replacing all ask rules for destination 'userSettings' with 0 rule(s): []
11511 2026-03-12T19:51:33.117Z [DEBUG] Replacing all allow rules for destination 'projectSettings' with 0 rule(s): []
11512 2026-03-12T19:51:33.117Z [DEBUG] Replacing all deny rules for destination 'projectSettings' with 0 rule(s): []
11513 2026-03-12T19:51:33.117Z [DEBUG] Replacing all ask rules for destination 'projectSettings' with 0 rule(s): []
11514 2026-03-12T19:51:33.117Z [DEBUG] Replacing all allow rules for destination 'localSettings' with 0 rule(s): []
11515 2026-03-12T19:51:33.117Z [DEBUG] Replacing all deny rules for destination 'localSettings' with 0 rule(s): []
11516 2026-03-12T19:51:33.117Z [DEBUG] Replacing all ask rules for destination 'localSettings' with 0 rule(s): []
11517 2026-03-12T19:51:33.120Z [DEBUG] Replacing all allow rules for destination 'localSettings' with 2 rule(s): ["WebSearch","Bash(uv run:*)"]
11518 2026-03-12T19:51:33.141Z [DEBUG] Fast mode unavailable: Fast mode requires extra usage billing · /extra-usage to enable
11519 2026-03-12T19:51:33.225Z [DEBUG] High write ratio: blit=30956, write=45760 (59.6% writes), screen=1279x159
11520 2026-03-12T19:51:33.384Z [DEBUG] Fast mode unavailable: Fast mode requires extra usage billing · /extra-usage to enable
11521 2026-03-12T19:51:34.362Z [DEBUG] Fast mode unavailable: Fast mode requires extra usage billing · /extra-usage to enable
11522 2026-03-12T19:51:59.870Z [ERROR] AxiosError: [url=https://http-intake.logs.us5.datadoghq.com/api/v2/logs] Error
11523 at <anonymous> (/$bunfs/root/claude:93:10649)
11524 at emit (node:events:92:22)
11525 at <anonymous> (/$bunfs/root/claude:92:5642)
11526 at request (/$bunfs/root/claude:95:2149)
11527 at processTicksAndRejections (native:7:39)
11528 2026-03-12T19:51:59.871Z [ERROR] AxiosError: [url=https://http-intake.logs.us5.datadoghq.com/api/v2/logs] Error
11529 at <anonymous> (/$bunfs/root/claude:93:10649)
11530 at emit (node:events:92:22)
11531 at <anonymous> (/$bunfs/root/claude:92:5642)
11532 at request (/$bunfs/root/claude:95:2149)
11533 at processTicksAndRejections (native:7:39)
11534 2026-03-12T19:51:59.871Z [ERROR] AxiosError: [url=https://http-intake.logs.us5.datadoghq.com/api/v2/logs] Error
11535 at <anonymous> (/$bunfs/root/claude:93:10649)
11536 at emit (node:events:92:22)
11537 at <anonymous> (/$bunfs/root/claude:92:5642)
11538 at request (/$bunfs/root/claude:95:2149)
11539 at processTicksAndRejections (native:7:39)
11540 2026-03-12T19:51:59.871Z [ERROR] AxiosError: [url=https://http-intake.logs.us5.datadoghq.com/api/v2/logs] Error
11541 at <anonymous> (/$bunfs/root/claude:93:10649)
11542 at emit (node:events:92:22)
11543 at <anonymous> (/$bunfs/root/claude:92:5642)
11544 at request (/$bunfs/root/claude:95:2149)
11545 at processTicksAndRejections (native:7:39)
11546 2026-03-12T19:51:59.871Z [ERROR] AxiosError: [url=https://http-intake.logs.us5.datadoghq.com/api/v2/logs] Error
11547 at <anonymous> (/$bunfs/root/claude:93:10649)
11548 at emit (node:events:92:22)
11549 at <anonymous> (/$bunfs/root/claude:92:5642)
11550 at request (/$bunfs/root/claude:95:2149)
...latest in that log file
26 times in that millisecond
1126470 2026-03-12T21:12:29.793Z [ERROR] AxiosError: [url=https://http-intake.logs.us5.datadoghq.com/api/v2/logs] Error
1126471 at <anonymous> (/$bunfs/root/claude:93:10649)
1126472 at emit (node:events:92:22)
1126473 at <anonymous> (/$bunfs/root/claude:92:5642)
1126474 at request (/$bunfs/root/claude:95:2149)
1126475 at processTicksAndRejections (native:7:39)
What Should Happen?
Logging should backoff, exponentially to, a least to a second or a few
Error Messages/Logs
#29576
Steps to Reproduce
Normal use on a constrained memory system, some memory pressure.
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.75
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
ghostty + tmux
<details><summary>Similar symptoms to #29576</summary>
- #27421 — "Memory leak + Swap growth — Claude Code Sonnet 4.6 kills sessions in ~8 min" (open, stale)
- #17615 — "Memory leak: Claude process using 304GB+ memory" (open, has repro, tagged perf:memory)
- #29576 — "Memory regression in v2.1.62: ~6.4GB RAM on 6.5GB system, causing repeated OOM kills" (open, regression)
- #33337 — "ArrayBuffers grow ~980 MB/hour in long sessions" (open, duplicate)
anthropics/claude-code #27421 open [BUG] Memory leak + Swap growth — Claude Code Sonnet 4.6 kills sessions in ~8 min (v2.1.49) stale 2026-03
anthropics/claude-code #17615 open Memory leak: Claude process using 304GB+ memory bug, has repro, platform:macos, area:core, memory,
perf:memory 2026-03-11T05:59:36Z
anthropics/claude-code #25855 open [BUG] Memory leak: multiple Claude processes accumulate 11GB+ RSS on Ubuntu 25.10 (kernel 6.17) bug, platform:l
stale 2026-03-01T10:09:22Z
anthropics/claude-code #24840 open Extreme memory consumption on Windows (13GB RSS, 47GB commit) with Bun Canary bug, has repro, platform:window
area:core, memory, perf:memory 2026-03-08T23:54:06Z
anthropics/claude-code #29576 open [BUG] Memory regression in v2.1.62: Claude process consuming ~6.4GB RAM on 6.5GB system, causing repeated OOM
kills bug, platform:linux, perf:memory, regression 2026-03-01T00:23:46Z
anthropics/claude-code #30870 open [BUG] Memory spikes during high tool fan-out in Explore mode on macOS (2.1.68) bug, has repro, platform:macos,
perf:memory, area:agents 2026-03-04T23:37:33Z
anthropics/claude-code #29648 open [FEATURE] Prompt suggestions should incorporate memory files and CLAUDE.md context enhancement, area:tui,
memory 2026-02-28T19:24:26Z
anthropics/claude-code #33337 open Memory leak: ArrayBuffers grow ~980 MB/hour in long sessions bug, duplicate, has repro, platform:linux,
perf:memory 2026-03-11T20:17:29Z
anthropics/claude-code #20369 open Orphaned subagent process leaks memory when parent terminal session terminated bug, has repro, platform:macos,
area:tools, area:core, perf:memory 2026-03-07T10:34:34Z
anthropics/claude-code #31414 open [BUG] Memory leak: RSS grows continuously (~1GB/min) with zero user interaction after session start bug, ha
platform:linux, perf:memory, regression 2026-03-07T01:11:02Z
</details>
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗