Codex running command for a long period

when i click stop it, does not stop as well. and after awhile codex restarted itself and my previous command are gone

Welcome to the community @chaeril,

This appears to match several existing Codex Desktop bugs:

You´re welcome to discuss Codex related bugs here, but for Codex bugs, reporting through the openai/codex GitHub issue tracker is usually the best route. If #24287 accurately matches the problem, add the reproduction details there. Otherwise, open a new issue and link these related reports. Include the OS, Codex version, exact command, local or remote environment, elapsed time and what happened after pressing Stop.