windows
Skill0 starsChanged 3 months agoMITView on GitHub
Lessons from building autonomous background daemons on Windows 11. Bug: Calling Shell_NotifyIconW(NIM_ADD, &nid) from a background Rust/console binary failed with 2147500037 (0x80004005 E_FAIL). Crates like tray-icon and tray-item crashed on startup when invoked headless. Fix: Windows Shell Notify APIs require an explicit Win32 message pump running on an STA thread. In raw Win32, call RegisterClassW + a hidden window message pump; in .NET/WinForms, wrap in [STAThread] and ApplicationContext. Check: Run the daemon under a non-interactive/hidden window launcher — tray icon…
5 other projects use a version of this.
Adopted by
Most recently taken up by
- Lukk17/agent-standardstheir own version, first seen Nov 1, 2026
- oracle/graalpythontheir own version, first seen Oct 8, 2026
- br3eze-code/br3eze-codetheir own version, first seen Jul 8, 2026
- Vesely/skillstheir own version, first seen May 1, 2026
- ffsshhttiikk/opencode-agents-skillstheir own version, first seen Feb 28, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- oracle/graalpython★ 1.7ksame name
- Vesely/skills★ 28same name
- br3eze-code/br3eze-code★ 3same name
- ffsshhttiikk/opencode-agents-skills★ 2same name
- Lukk17/agent-standards★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository9 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- android-share-intentsSkill
- ci-verify-generated-codeSkill
- multi-agent-gitSkill
- anti-default-gatesSkill
- flutter-drift-androidSkill
- android-settings-wiringSkill
- rust-boundariesSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
Check: Run the daemon under a non-interactive/hidden window launcher — tray icon must register and return success, not E_FAIL.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Windows Desktop Daemon Lessons
Lessons from building autonomous background daemons on Windows 11.
1. Shell_NotifyIconW fails with 0x80004005 in console processes
Bug: Calling Shell_NotifyIconW(NIM_ADD, &nid) from a background Rust/console
binary failed with 2147500037 (0x80004005 E_FAIL). Crates like tray-icon
and tray-item crashed on startup when invoked headless.
Fix: Windows Shell Notify APIs require an explicit Win32 message pump
running on an STA thread. In raw Win32, call RegisterClassW + a hidden window
message pump; in .NET/WinForms, wrap in [STAThread] and ApplicationContext.
Check: Run the daemon under a non-interactive/hidden window launcher — tray icon must register and return success, not E_FAIL.
2. Headless NotifyIcon silently exits without ApplicationContext
Bug: A background tray daemon launched via -WindowStyle Hidden appeared in
process list for 2 seconds and exited without an error or Event Viewer entry.
Garbage collection swept the tray handle because no main window was open.
Fix: Pass an explicit ApplicationContext to Application.Run(context). Do
not rely on parameterless Application.Run() when the process has no visible
Form window.
Check: Get-Process <name> 10 seconds after hidden launch must show active
PID with stable working set.
3. Task Manager Startup tab ignores HKCU Run without StartupApproved
Bug: Adding an executable to HKCU\Software\Microsoft\Windows\CurrentVersion\Run
ran the app on boot, but the app was completely invisible in Windows 11 Task
Manager's "Startup apps" tab.
Fix: Task Manager requires a companion entry in
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\Run
with binary value 02 00 00 00 00 00 00 00 00 00 00 00. Update both registry
paths during install/setup.
Check: Open Task Manager → Startup apps; verify entry displays with status "Enabled" rather than missing.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

