Skip to content

Windows 10: Codex app triggers Microsoft Defender Behavior Monitoring / high CPU after recent update #30527

Open

Description

@annmont

What version of the Codex App are you using (From “About Codex” dialog)?

26.623.61825, released Jun 28, 2026

What subscription do you have?

ChatGPT Plus

What platform is your computer?

Windows 10 Pro x64, version 22H2, ThinkPad X1 Carbon 4th Gen, Intel i5-6300U, 8 GB RAM

What issue are you seeing?

After a recent update, the Codex Windows app started triggering Microsoft Defender Behavior Monitoring / Antimalware Service Executable high CPU on Windows 10.

This started suddenly around June 27–28, 2026. The same large project worked normally in Codex about 2 days earlier on the same laptop.

Steps to reproduce:

  1. Start Windows 10.
  2. Launch Codex app.
  3. Open the same existing project.
  4. Do not start any task; just launch the app / leave it idle.
  5. Microsoft Defender Antimalware Service Executable immediately starts using high CPU.
  6. If Defender Behavior Monitoring is disabled, Defender CPU drops, but Codex processes themselves start consuming CPU instead.
  7. If Defender Behavior Monitoring is enabled, Antimalware Service Executable consumes high CPU while reacting to Codex activity.

Observed processes:

  • codex.exe
  • multiple Codex processes
  • node.exe / node_repl.exe
  • git.exe
  • conhost.exe
  • Antimalware Service Executable / Microsoft Defender Antivirus Service

What I tried:

  • Added Defender exclusions for the project folder.
  • Added Defender process exclusions for codex.exe, node.exe, node_repl.exe, git.exe.
  • Tried limiting Defender scheduled scan CPU usage.
  • Cleaned disk space; free space is now about 57 GB.
  • Restarted Windows.
  • Verified SSD health: CrystalDiskInfo reports Good, 88%.
  • The only thing that noticeably helped was disabling Behavior Monitoring, but Windows Defender / Tamper Protection re-enabled it.

Expected behavior:
Codex should be usable on the same existing project without triggering continuous Defender Behavior Monitoring or spawning enough background activity to make Windows 10 unusable.

Actual behavior:
Simply launching Codex makes either Defender or Codex-related processes consume CPU continuously. The laptop becomes slow and the fan runs continuously.

System:

  • Windows 10 Pro x64 22H2
  • ThinkPad X1 Carbon 4th Gen
  • Intel Core i5-6300U
  • 8 GB RAM
  • SSD with about 57 GB free space
  • Microsoft Defender enabled

What steps can reproduce the bug?

  1. Use Windows 10 Pro x64 22H2 with Microsoft Defender enabled.
  2. Install / update to the latest desktop Codex app version.
  3. Launch Codex.
  4. Open an existing large project that worked normally in Codex 2 days earlier.
  5. Do not start a new task; just leave Codex open or minimized.
  6. Open Task Manager.
  7. Observe that multiple Codex-related processes appear, including codex.exe, node.exe / node_repl.exe, git.exe and conhost.exe.
  8. Microsoft Defender Antimalware Service Executable starts consuming high CPU.
  9. If Defender Behavior Monitoring is disabled, Defender CPU drops, but Codex-related processes themselves start consuming CPU.
  10. If Behavior Monitoring is enabled, Defender consumes CPU while reacting to Codex activity.

This started after a recent Codex / Windows security update. The same project and same laptop worked normally about 2 days earlier.

What is the expected behavior?

Codex should be usable on the same existing project without triggering continuous Microsoft Defender Behavior Monitoring or causing Antimalware Service Executable to consume high CPU.

Launching Codex and leaving it idle should not spawn continuous background activity that makes Windows 10 slow or unusable.

Additional information

No response

Activity

  1. added
    appIssues related to the Codex desktop app
    on Jun 29, 2026
  2. netwolf1 commented on Jun 30, 2026

    @netwolf1

    Same here, constant high Defender CPU usage as soon as Codex desktop is started (even if idle, doing nothing), and instantly drops as soon as Codex is closed.
    No disk or network activity but 5-10% CPU usage (and entire core!!).
    Codex itself hardly uses any CPU at that time.
    I also noticed that it creates a huge number of .js files when started (again, no active tasks at that time).

    Extremely annoying, forces me to close Codex whenever I don't actively use it.
    Claude and other competitors don't have similar issues.

  3. harrydbarnes commented on Jul 1, 2026

    @harrydbarnes

    I have this too

  4. cincinno commented on Jul 2, 2026

    @cincinno

    same here

  5. lartpang commented on Jul 2, 2026

    @lartpang

    @netwolf1 @cincinno @annmont @harrydbarnes

    I'm seeing something very similar on Windows.

    From what I observed locally, Codex does not appear to be running a heavy project task when this happens. The active processes are mostly the Codex desktop shell, the local codex.exe app-server, a few helper runtimes such as node_repl.exe / PowerShell, and occasional Git status checks. However, Windows Defender can spike heavily right after Codex starts or while it is idle.

    My guess is that Defender is reacting to Codex’s local runtime/cache/workspace activity rather than to actual model computation. In particular, Codex seems to create or touch a number of local runtime/cache files, including JS-related files, and Defender scans them aggressively. This would explain why Defender CPU drops immediately when Codex is closed, even though Codex itself is not using much CPU.

    A narrow Defender exclusion for the Codex workspace directory, e.g. C:\Users\<user>\Documents\Codex, appears to reduce the problem, but that is only a workaround and not ideal from a security perspective. It would be useful if Codex could reduce startup/idle file churn, reuse generated runtime files more aggressively, or document which local directories are safe to exclude from Defender scanning.

    For diagnosis, the useful processes to compare are:

    • Codex.exe
    • codex.exe app-server
    • node_repl.exe
    • pwsh.exe / powershell.exe
    • git.exe
    • MsMpEng.exe

    In my case, the high CPU was mostly Defender, not Codex itself.


    Update: adding path exclusions for the Codex runtime/cache directories did not fully solve the issue for me.

    The CPU usage dropped only after adding Defender process exclusions:

    Add-MpPreference -ExclusionProcess "Codex.exe"
    Add-MpPreference -ExclusionProcess "codex.exe"

    This suggests the high Defender CPU usage is likely caused by real-time monitoring of Codex process behavior, child processes, or script/runtime activity, rather than only file scanning under the Codex workspace/cache directories.

    This is not an ideal workaround from a security perspective, but it helps narrow down the issue.

  6. netwolf1 commented on Jul 2, 2026

    @netwolf1

    Also tried excluding folder and/or process but that didn't really solve the problem of high Defender CPU usage even when Codex is idle (besides the legitimate security concerns).

    There is definitely something wrong with current Codex desktop app for Windows.

  7. lartpang commented on Jul 3, 2026

    @lartpang
    Image

    By gpt

  8. mdroidian commented on Jul 4, 2026

    @mdroidian

    I’m seeing a more specific pattern that may help narrow this down.

    If I open Codex and it is on a new chat, I do not see the high CPU behavior from Microsoft Defender / Antimalware Service Executable.

    However, as soon as I open a chat that previously created an HTML artifact in /outputs — for example, after a prompt like Create a .html review of PR #1234 — Antimalware Service Executable CPU usage and Power usage spike and stay high until I close Codex.

    If I open a chat that does not have this type of generated HTML artifact, I do not see the spike.

    So in my case this does not seem to happen for every Codex chat or simply from launching Codex. It appears correlated with reopening a chat/session that has generated an .html artifact under /outputs.

  9. AwakeNow101 commented on Jul 13, 2026

    @AwakeNow101

    I can reproduce a very similar issue, with a few additional observations that may help narrow it down.

    Environment:

    • Windows 10 Home
    • Microsoft Defender enabled
    • ChatGPT/Codex desktop app: 26.707.8168.0
    • VS Code Codex/OpenAI extension: 26.707.41301
    • Defender engine: 1.1.26060.3008
    • 32 logical processors

    Observed behavior:

    • Codex CLI does not reproduce the issue, even during normal chat/task usage.
    • The desktop app does not always trigger the issue just by launching.
    • Opening certain conversations triggers sustained MsMpEng.exe / Antimalware Service Executable CPU.
    • Simple new chats may not reproduce it.
    • Once a “bad” conversation is opened, switching to another conversation does not reduce Defender CPU, suggesting that some local app-server / code-mode / tool bridge is lazily loaded and remains alive.
    • The VS Code extension can also raise Defender CPU on activation, likely because it starts a local codex app-server / code-mode host.

    Defender diagnostics:

    • MsMpEng.exe often reaches around 100%-250% process CPU in performance counters.
    • Disk I/O is near zero.
    • Microsoft Defender performance report shows TopScans dominated by:
      MemScanVfz-AMSI-...
      Reason: AMSI

    Things tried:

    • Project folder exclusions: little/no effect.
    • Process exclusions for ChatGPT/Codex executables: little/no effect.
    • Set-MpPreference -ScanAvgCPULoadFactor 15: no meaningful effect.
    • Set-MpPreference -DisableScriptScanning $true: no meaningful effect.
    • Set-MpPreference -DisableBehaviorMonitoring $true could not be made to stick, likely due to Defender protection / Tamper Protection policy.

    This suggests the issue may involve Defender behavior monitoring, AMSI/memory scanning, or another real-time protection path triggered by the desktop app / VS Code extension local app-server. The CLI path appears much lighter and does not reproduce the issue.

  10. PeterTobi commented on Jul 13, 2026

    @PeterTobi

    Same problem here, whenever I start VS Code with the Codex extension triggers Microsoft Defender and uses 5% of the CPU continuously, more or less. Operating system: Windows 11

  11. VishveshC commented on Jul 14, 2026

    @VishveshC

    Same problem. Win11, latest.

  12. Jifancy commented on Jul 15, 2026

    @Jifancy

    Same problem. Win 11, latest

  13. harrydbarnes commented on Jul 15, 2026

    @harrydbarnes

    Happened again to me today

  14. ttys001 commented on Jul 17, 2026

    @ttys001

    Same problem. Win 11, latest

  15. askxue commented on Jul 19, 2026

    @askxue

    So, hasn’t anyone fixed this issue? Now the Windows desktop is almost unusable—it immediately spikes CPU usage to 100% when opened.

  16. suiyuebaobao commented on Jul 22, 2026

    @suiyuebaobao

    The Defender load in this report matches the downstream behavior I measured; in my reproduction, repeated desktop Git refreshes were the original workload.

    I published a single-file Windows launcher for the original Microsoft Store/MSIX Codex app:

    It starts Codex with a process-scoped GIT_DIR=NUL. On my machine, the stable trace changed from 247 new git.exe and 137 new taskkill.exe processes per 10 seconds to 0 and 0 over 15 seconds; WMI Provider Host fell from about 6.6% to 0.9%.

    Usage: fully exit Codex from the Windows system tray, then run the script.

    This is an unofficial workaround, not an upstream fix. It deliberately disables or limits Review, Changes, branch detection, commit, and other Git-backed Codex features. It does not patch Codex, modify repositories or Git configuration, write system environment variables, require elevation, terminate processes, or remove chat history. Launching Codex normally restores Git integration.

  17. zhang8630 commented on Aug 6, 2026

    @zhang8630

    I have this too

  18. loktar00 commented on Aug 10, 2026

    @loktar00

    Same here, has been getting worse recently.

  19. athan614 commented on Aug 26, 2026

    @athan614

    I can replicate this too with latest version to-date

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

    appIssues related to the Codex desktop appbugSomething isn't workingperformancewindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions