Skip to content

Fix lingering cli process after quitting#397

Open
uraimo wants to merge 2 commits intosteipete:mainfrom
uraimo:fix-lingering-cli-process
Open

Fix lingering cli process after quitting#397
uraimo wants to merge 2 commits intosteipete:mainfrom
uraimo:fix-lingering-cli-process

Conversation

@uraimo
Copy link

@uraimo uraimo commented Feb 18, 2026

Hi, this fixes the CLI process (codex in my case) lingering around at 100% core after the application has been closed normally clicking Quit.
It builds a registry for all the started processes and manually kills them when the application terminates, a brute force approach but mine/clanker other attempts to quit cleanly failed, probably because the quitting is happening while processing is ongoing on the CLI and sending a /exit is basically useless.

Processes screenshot after a restart with the hung-up "codex" from the previous session:
Screenshot 2026-02-18 at 09 42 43

Tested and now the process are reliably cleaned up. Tested with codex but added the same mechanism to claude since it could likely be affected by the same issue.

I could see any CONTRIBUTING.md so I've just opened a PR, hope it's ok.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3cc8f81756

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@uraimo
Copy link
Author

uraimo commented Feb 18, 2026

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a9d4ec20a6

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@uraimo uraimo force-pushed the fix-lingering-cli-process branch from a9d4ec2 to f6ac6a5 Compare February 18, 2026 09:56
@uraimo
Copy link
Author

uraimo commented Feb 18, 2026

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f6ac6a5302

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@uraimo uraimo force-pushed the fix-lingering-cli-process branch from f6ac6a5 to 12ebc73 Compare February 18, 2026 10:15
@uraimo
Copy link
Author

uraimo commented Feb 18, 2026

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 12ebc7317a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@uraimo uraimo force-pushed the fix-lingering-cli-process branch 2 times, most recently from 2d3b5f1 to eb48fe7 Compare February 18, 2026 12:00
@uraimo
Copy link
Author

uraimo commented Feb 18, 2026

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: eb48fe7587

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@uraimo uraimo force-pushed the fix-lingering-cli-process branch from eb48fe7 to 03b55fb Compare February 18, 2026 12:09
@uraimo
Copy link
Author

uraimo commented Feb 18, 2026

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 03b55fb32c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@uraimo uraimo force-pushed the fix-lingering-cli-process branch from 03b55fb to b86582c Compare February 18, 2026 12:18
@uraimo
Copy link
Author

uraimo commented Feb 18, 2026

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b86582c3e1

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

avoid -1 after successful terminate, align
SIGTERM/CHECK/SIGKILL pattern everywhere
@uraimo uraimo force-pushed the fix-lingering-cli-process branch from b86582c to 1241958 Compare February 18, 2026 12:35
@uraimo
Copy link
Author

uraimo commented Feb 18, 2026

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1241958582

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@uraimo
Copy link
Author

uraimo commented Feb 18, 2026

Done, nothing more to add here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments