Skip to content

fix(examples): improve gemini.py CLI experience#103

Merged
PsiACE merged 1 commit into
agentclientprotocol:mainfrom
whhe:improve/gemini-example-ux
May 24, 2026
Merged

fix(examples): improve gemini.py CLI experience#103
PsiACE merged 1 commit into
agentclientprotocol:mainfrom
whhe:improve/gemini-example-ux

Conversation

@whhe
Copy link
Copy Markdown
Contributor

@whhe whhe commented May 21, 2026

Summary

Improve the Gemini example's compatibility and robustness with a few small fixes.

Changes

  • Support --acp flag (default) with --experimental-acp fallback via CLI arg, and update docs/quickstart.md accordingly
  • Suppress Gemini CLI stderr output in non-debug mode to reduce terminal noise
  • Drain subprocess stdin before terminating in _shutdown() for cleaner process teardown
  • Catch KeyboardInterrupt in main() to exit silently instead of printing a traceback

Motivation

The Gemini CLI has graduated --experimental-acp to --acp, but older installations still need the old flag. The other fixes address minor UX papercuts: noisy stderr output, unclean shutdown on Ctrl-C, and a possible broken-pipe on teardown.

- Support --acp flag with --experimental-acp fallback for older versions
- Suppress Gemini CLI stderr noise in non-debug mode
- Drain stdin before terminating subprocess for cleaner shutdown
- Catch KeyboardInterrupt in main() to avoid noisy traceback

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@PsiACE PsiACE left a comment

Choose a reason for hiding this comment

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

lgtm, thanks

@PsiACE PsiACE merged commit fd3de6e into agentclientprotocol:main May 24, 2026
8 checks passed
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.

2 participants