gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

hide `missing pgrep output` debug console error option

Open sam-ckchan opened this issue 1 year ago • 3 comments

What happened?

│ Debug Console (ctrl+o to close) │ │ │ │ ℹ Authenticated via "oauth-personal". │ │ ✖ missing pgrep output

What did you expect to happen?

Just hide it as it's a minor, internal error within the CLI tool's process management system?

Client information

  • CLI Version: 0.1.9
  • Git Commit: 34935d6
  • Operating System: darwin v23.2.0
  • Sandbox Environment: no sandbox
  • Model Version: gemini-2.5-pro
  • Memory Usage: 146.1 MB

Login information

No response

Anything else we need to know?

No response

sam-ckchan avatar Jul 14 '25 04:07 sam-ckchan

Hello,

I have been investigating this missing pgrep output error and, based on local session logs, I have a hypothesis for the root cause.

Hypothesis: The error is caused by a race condition.

  1. The error consistently occurs after executing very fast, non-interactive shell commands (e.g., mkdir, cp, git checkout).
  2. It appears the command's process finishes so quickly that it terminates before the CLI's internal pgrep check is performed.
  3. Therefore, pgrep correctly finds no running process and returns an empty output, which the CLI then flags as the "missing pgrep output" error.

This suggests the error isn't a bug in pgrep itself, but rather in the monitoring logic that doesn't account for instantly-finishing processes.

I also believe this is the root cause for the agent stalling behavior reported in Issue #6050, and have posted a more detailed analysis there.

Instead of just hiding this error, a more robust fix might be to treat an empty pgrep output combined with a successful command exit code (0) as a success case.

hebenezer-m avatar Sep 04 '25 04:09 hebenezer-m

Well we also got:

pgrep: pgrep: unrecognized option: g
pgrep: BusyBox v1.37.0 (2025-05-26 20:04:45 UTC) multi-call binary.
pgrep: Usage: pgrep [-flanovx] [-s SID|-P PPID|PATTERN]
pgrep: Display process(es) selected by regex PATTERN
pgrep: 	-l	Show command name too
pgrep: 	-a	Show command line too
pgrep: 	-f	Match against entire command line
pgrep: 	-n	Show the newest process only
pgrep: 	-o	Show the oldest process only
pgrep: 	-v	Negate the match
pgrep: 	-x	Match whole name (not substring)
pgrep: 	-s	Match session ID (0 for current)
pgrep: 	-P	Match parent process ID
pgrep: 	-u EUID Match against effective UID
pgrep: 	-U UID  Match against UID

so much fun log spew

Downchuck avatar Sep 13 '25 00:09 Downchuck

Hello! As part of our effort to keep our backlog manageable and focus on the most active issues, we are tidying up older reports.

It looks like this issue hasn't been active for a while, so we are closing it for now. However, if you are still experiencing this bug on the latest stable build, please feel free to comment on this issue or create a new one with updated details.

Thank you for your contribution!

gemini-cli[bot] avatar Dec 03 '25 21:12 gemini-cli[bot]