Windows Defender repeatedly prompts to submit .codex\config.toml; one prompt showed the same path twice
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.tomlC:\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.tomlacross 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 submissiondialog forC:\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.tomlwas 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.tomlcreated: 2026-06-03 03:10:50 local timeconfig.tomlwritten: 03:11:13chrome-native-hosts-v2.jsoncreated: 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
9 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
same for me
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.
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
%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-MpThreatDetectionreturned no detection for that period. The visible UI was specifically the sample-submission consent dialog.Environment
DisableRealtimeMonitoring = FalseMAPSReporting = 2SubmitSamplesConsent = 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.
I found a concrete Codex-side write path that may explain why Defender keeps reconsidering
config.toml.Installed build: Codex Desktop
26.715.4045.0on Windows 11.Inspection of the packaged Desktop JavaScript shows that it:
``
text
``\\.\pipe\codex-computer-use-${randomUUID()}
SKY_CUA_NATIVE_PIPE_DIRECTORY.mcp_servers.node_replconfiguration.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:
config.tomlThe fix should be to keep
SKY_CUA_NATIVE_PIPE_DIRECTORYin a process/session runtime overlay instead of writing it intoconfig.toml. Managed reconciliation should also avoid rewriting the file when its durable semantic contents have not changed.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.
I am also facing the same issue, as of 2026-08-01, the issue still exist.
Seeing the same thing here. Multiple config.toml submissions.
same here