[proprosal] telemetry for Codex-uwp is crashing {windows sandbox apps/ Universal Windows Platform apps}UWP-Compliant Approach - (for windows - codex-dekstop-app )

Resolved 💬 5 comments Opened Jun 7, 2026 by Mahkhmood9 Closed Jul 3, 2026

What variant of Codex are you using?

App (the users who report issues)

What feature would you like to see?

if the user crashes on some function -- have a way to monitor CODEX APP -- in the past there was an issue that caused the app to crash ---

  1. either users were able to collect debug .dmp ,, or .log file (or even see an exception window [which is indursty standard to atleast give a scary exceptoin if the app crash -- ] )
  2. Either openai employees are able to see a surplus of user errors

[proprosal:] mandetory user data colelction , if the Codex App has crashed and which function it happen
----> the next logical step would be monitor which users repeat the crash more often --- so crashes are happening ---- alternatively if it works --- this can be used to monitor deadlocks or whatever

----
the story:

I say the comment https://github.com/openai/codex/issues/24598#issuecomment-4546343937

and https://github.com/openai/codex/issues/24998#issuecomment-4571545629
where I asked a user to attach - the codex app into a debugger (and replicated the crash)

one on the maintainers original closed the issue
<img width="1655" height="305" alt="Image" src="https://github.com/user-attachments/assets/b01b4940-1bf3-4b9e-bee5-3b79d804fa42" />

its important , if the Codex App is crashing there is a way to monitor ,

````
PS C:\Users\User> Get-StartApps | Where-Object {$_.Name -like "Codex"}

Name AppID
---- -----
Codex OpenAI.Codex_2p2nqsd0c76g0!App

1. Initialize the Shell COM object and launch the app

$shell = New-Object -ComObject Shell.Application
$shell.ShellExecute("shell:AppsFolder\OpenAI.Codex_2p2nqsd0c76g0!App")

````

Offcial microsfot UWP docmentation
https://learn.microsoft.com/en-us/windows/uwp/develop/

there is
https://learn.microsoft.com/en-us/windows/uwp/launch-resume/app-lifecycle#app-launch

there is ApplicationExecutionState IF== NotRunning
It can also be in this state if it was running but then crashed?????

https://learn.microsoft.com/en-us/uwp/api/windows.ui.xaml?view=winrt-28000
generally I assumed it has to do with this windows.ui.xaml , which is a UWP thing (image related , see the UWP) im not sure if it has to do something with non UWP apps some how

<img width="854" height="330" alt="Image" src="https://github.com/user-attachments/assets/657a9c41-d1ca-4a6b-ad5b-78f6225fc011" />

using aI I get two suggests

!!!(AI GENERATED SLOP)
#include "pch.h"
#include "App.h"
#include <winrt/Windows.UI.Xaml.h>
#include <iostream>

using namespace winrt;
using namespace Windows::UI::Xaml;

// Implementation of your App class constructor/initialization
App::App()
{
    InitializeComponent();

    // The official Microsoft UWP approach to registering a native C++ failure handler
    UnhandledException([this](IInspectable const& sender, UnhandledExceptionEventArgs const& e)
    {
        // 1. Mark that we are actively handling/noting the event telemetry-wise
        // Setting this to true attempts to keep the app alive if safe, 
        // but for critical crashes, we use it to safely dump logs before dying.
        bool isHandled = e.Handled(); 

        // 2. Extract the native Windows HRESULT exception code
        hresult exceptionCode = e.Exception();

        // 3. Extract the text message associated with the failure
        hstring exceptionMessage = e.Message();

        // 4. Safely pipe this diagnostic to a crash reporting dashboard, file or console
        // Note: Writing directly to relative files is blocked by UWP sandbox boundaries!
        // OutputDebugString is explicitly allowed and visible to diagnostic debuggers.
        std::wstring logOutput = L"CRASH LOGGED: " + std::wstring(exceptionMessage.c_str()) + 
                                 L" (HRESULT: " + std::to_wstring(exceptionCode) + L")\n";
        
        OutputDebugStringW(logOutput.c_str());

        // If it's a structural catastrophic failure, allow the OS to cleanly record it
        if (!isHandled)
        {
            // The process terminates naturally, prompting the underlying Windows 
            // Error Reporting (WER) system to grab the local minidump configuration.
        }
    });
}```

second is using
public event UnhandledExceptionEventHandler? UnhandledException;
https://learn.microsoft.com/en-us/dotnet/fundamentals/runtime-libraries/system-appdomain-unhandledexception
https://learn.microsoft.com/en-us/dotnet/api/system.appdomain.unhandledexception?view=net-10.0

which the LLM call legacy for some reason ?

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗