Windows Defender repeatedly prompts to submit .codex\config.toml; one prompt showed the same path twice

Open 💬 9 comments Opened Jun 30, 2026 by MercYuriy
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

Summary

Microsoft Defender on Windows has repeatedly shown Sample submission prompts involving Codex's local config.toml across separate events and machines.

A later screenshot captured on June 29, 2026 on laptop YURIYS_GAMINGPC directly showed Defender listing the same exact path twice in one prompt window:

  • C:\Users\shimk\.codex\config.toml
  • C:\Users\shimk\.codex\config.toml

This suggests either:

  • Codex is causing Defender to repeatedly see/re-evaluate this file during normal startup/update/plugin activity
  • Defender is overreacting to a normal Codex config file
  • or there is a duplicate-entry / duplicate-handle edge case in how the file is being surfaced

What is confirmed

  • Defender repeatedly prompted for Codex's local .codex\config.toml across separate events.
  • The pattern occurred on both desktop and laptop.
  • On the laptop, a preserved screenshot from 2026-06-29 directly showed a Defender Sample submission dialog for C:\Users\shimk\.codex\config.toml, with the same path shown twice in the same prompt window.
  • Earlier laptop investigation showed C:\Users\shimk\.codex\config.toml was newly created at 2026-06-03 03:10:50 America/Los_Angeles.
  • In that same minute, Codex logs showed plugin/install, bundled marketplace writes, and Chrome host reconciliation.
  • A nearby file, C:\Users\shimk\.codex\chrome-native-hosts-v2.json, was also created immediately afterward.
  • Defender on the laptop had SubmitSamplesConsent = 1, so prompting before upload is expected when Defender wants to submit a file sample.

What is not confirmed

  • I have not confirmed that every prompt involved the exact same unchanged file hash.
  • I have not found a Defender operational-log entry explicitly naming config.toml.
  • I have not proven whether the duplicate rows in the June 29 prompt were byte-identical copies, separate handles, or a Defender/UI duplication artifact.

Why this seems relevant to Codex

The timing on the laptop strongly suggests the file is being created or rewritten during normal Codex local-state/setup/update/plugin activity, not just sitting unchanged:

  • config.toml created: 2026-06-03 03:10:50 local time
  • config.toml written: 03:11:13
  • chrome-native-hosts-v2.json created: 03:11:14
  • Codex logs in the same minute showed plugin install + bundled marketplace writes + Chrome host reconciliation

That makes it plausible that Codex is regenerating or rewriting local config state in a way that repeatedly surfaces config.toml to Defender.

User impact

  • Repeated Windows Defender prompts during normal Codex use
  • User uncertainty about whether Codex local state is unsafe
  • One prompt showed the same exact path twice, which makes the behavior look buggy rather than merely cautious

Request

Could you investigate whether recent Windows/Desktop Codex behavior is rewriting or recreating .codex\config.toml (or surfacing it multiple times) in a way that triggers repeated Defender sample-submission prompts?

If useful, I can follow up with:

  • the exact screenshot text from the June 29 Defender prompt
  • the SHA-256 observed for the June 3 laptop config.toml
  • the local investigation summary correlating the file timestamps with Codex log activity

View original on GitHub ↗

9 Comments

github-actions[bot] contributor · 1 month ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #30527

Powered by Codex Action

almirus · 1 month ago

same for me

undergroundrap · 1 month ago

Cross-linking #31419 because both reports involve Microsoft Defender reacting to normal Codex activity on Windows, although they may not share the same root cause.

#31419 involved codex-computer-use.exe being detected as Trojan:Win32/ClickFix.DE!MTB, which appears to have stopped after a Defender update. This issue involves repeated sample-submission prompts for .codex\config.toml.

A user in this OpenAI Community thread reports that the config.toml prompts continued even after automatic sample submission was disabled. I have not independently verified that setting, so I’m sharing it as a potentially useful connection rather than claiming a confirmed reproduction.

It may be worth checking whether Codex is repeatedly rewriting/touching config.toml, and whether the prompts correlate with Codex startup, plugin reconciliation, or Defender intelligence updates.

request10hour · 1 month ago

I can confirm this on another Windows 11 PC. The behavior is still recurring on 2026-07-14 (KST) with a current Codex Desktop build.

Observed

  • At 19:38, Windows Security showed at least three identical sample-submission notifications.
  • Seven minutes later, at 19:45, it showed at least five more.
  • Opening the sample-submission dialog showed nine entries, all for the exact same path: %USERPROFILE%\.codex\config.toml.

This extends the original two-row example: the duplication can reach nine rows in one dialog, while repeated toast notifications are also generated in a short burst.

A read-only metadata check afterward found that the current file object's NTFS creation time and last-write time were both 19:50:50 KST, later than the two prompt bursts (size: 4,570 bytes; contents were not inspected). That is consistent with the file having been replaced/recreated at the same path after the prompts, but it does not establish which process did so or whether that caused the prompts.

The Defender Operational log for the surrounding window contained no warning/error or malware-detection event, and Get-MpThreatDetection returned no detection for that period. The visible UI was specifically the sample-submission consent dialog.

Environment

  • Codex for Windows (MSIX): 26.707.9981.0 (x64)
  • Windows 11 Pro 25H2: build 26200.8737 (x64)
  • Microsoft Defender platform: 4.18.26060.3008
  • Defender engine: 1.1.26060.3008
  • Security intelligence: 1.455.125.0
  • Real-time protection, behavior monitoring, IOAV protection, and tamper protection: enabled
  • DisableRealtimeMonitoring = False
  • MAPSReporting = 2
  • SubmitSamplesConsent = 1 (SendSafeSamples)

I have not captured the hash/mtime at each individual prompt, so this still does not distinguish between repeated Codex writes, multiple Defender scan/submission requests, and a Windows Security UI/queue duplication issue.

Disabling Defender real-time or cloud protection is not a viable workaround for me; I want to keep the protection level enabled. I can provide redacted screenshots if useful.

Kerbz-dev · 1 month ago

I found a concrete Codex-side write path that may explain why Defender keeps reconsidering config.toml.

Installed build: Codex Desktop 26.715.4045.0 on Windows 11.

Inspection of the packaged Desktop JavaScript shows that it:

  1. Generates a random Computer Use pipe name:

``text
\\.\pipe\codex-computer-use-${randomUUID()}
``

  1. Places that transient value in SKY_CUA_NATIVE_PIPE_DIRECTORY.
  2. Builds it into the managed mcp_servers.node_repl configuration.
  3. Persists the result through config/batchWrite, which writes durable %USERPROFILE%\.codex\config.toml.

The random value is generated per Desktop process launch. Plugin/Node REPL reconciliation can also run more than once. Codex is therefore treating an ephemeral runtime endpoint as durable user configuration and can recreate or rewrite the file during otherwise normal app activity.

I cannot prove Defender’s internal sample-submission heuristic, but I can prove this Codex write path exists. On this machine:

  • Defender recorded no threat for config.toml
  • the Defender Operational log contained no matching detection
  • a direct Defender scan of the file was clean
  • choosing either Send or Don’t send did not prevent later prompts

The fix should be to keep SKY_CUA_NATIVE_PIPE_DIRECTORY in a process/session runtime overlay instead of writing it into config.toml. Managed reconciliation should also avoid rewriting the file when its durable semantic contents have not changed.

EYEVO · 28 days ago

Same issue here. Defender keeps bugging me about config.toml every time I use Codex. OpenAI should definitely reach out to Microsoft about this if they haven't already. Seems like a false positive that needs to get sorted out.

ejsiddiqui · 26 days ago

I am also facing the same issue, as of 2026-08-01, the issue still exist.

ekinnee · 24 days ago

Seeing the same thing here. Multiple config.toml submissions.

AoSankaku · 17 days ago

same here