Skip to content

feat(cli): improve /agents refresh logging#26442

Merged
cocosheng-g merged 5 commits intomainfrom
feat/improve-agents-refresh-logging-16272
May 4, 2026
Merged

feat(cli): improve /agents refresh logging#26442
cocosheng-g merged 5 commits intomainfrom
feat/improve-agents-refresh-logging-16272

Conversation

@cocosheng-g
Copy link
Copy Markdown
Contributor

@cocosheng-g cocosheng-g commented May 4, 2026

Summary

This PR improves the logging and feedback provided by the /agents refresh (and /agents reload) command. Instead of a generic success message, it now provides a detailed summary of the reload operation, including the total number of agents loaded (local vs. remote), names of new, updated, and deleted agents, and any errors encountered during loading.

Details

  • Updated AgentRegistry.reload() in packages/core to return an AgentReloadSummary object.
  • Implemented state tracking in AgentRegistry to identify new, updated, and deleted agents by comparing current state with previous state.
  • Efficient Update Detection: Uses metadata hashes to identify modified agents without false positives from path changes.
  • Thread-Safe Error Collection: Refactored loading methods to use a local error collector, avoiding reliance on global event listeners for better safety in concurrent environments.
  • Optimized Logic: Consolidated redundant clear() calls and implemented a single-pass loop for calculating summary statistics.
  • Non-Breaking Remote Hashing: Maintains backward compatibility for URL-based remote agents by using the raw URL as the hash, while providing SHA-256 content-based hashing for inline JSON agents.
  • Status-Aware Messaging: Updated the CLI feedback to show "Agents reloaded with errors:" when appropriate, providing more accurate feedback.
  • Added a hint to run /agents list after a successful refresh.

Example Output

Running /agents refresh now provides detailed feedback:

Reloading agent registry...
Agents reloaded successfully:
- Total: 5 (3 local, 2 remote)
- New: researcher, coder
- Updated: debugger
- Deleted: old-agent

Run /agents list to see all available agents.

If errors occur during reload:

Reloading agent registry...
Agents reloaded with errors:
- Total: 4 (2 local, 2 remote)
- New: researcher
- Errors: 1 encountered during reload

Run /agents list to see all available agents.

Related Issues

Closes #16272

How to Validate

  1. Run the Gemini CLI.
  2. Execute /agents refresh.
  3. Verify the output shows the count of loaded agents.
  4. Add a new local agent in ~/.gemini/agents/ and run /agents refresh again.
  5. Verify "New" agents are listed correctly.
  6. Modify an existing agent and verify it appears in the "Updated" list.
  7. Delete an agent and verify it appears in the "Deleted" list.
  8. Run npm test -w @google/gemini-cli-core -- src/agents/registry.test.ts
  9. Run npm test -w @google/gemini-cli -- src/ui/commands/agentsCommand.test.ts

Pre-Merge Checklist

  • Updated relevant documentation and README (if needed)
  • Added/updated tests (if needed)
  • Noted breaking changes (if any)
  • Validated on MacOS

@cocosheng-g cocosheng-g requested a review from a team as a code owner May 4, 2026 15:15
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the user experience for the agent refresh command by replacing a generic success message with a comprehensive summary of the reload operation. By tracking agent state changes and capturing errors during the loading process, the CLI now provides actionable feedback to users about the status of their local and remote agents.

Highlights

  • Enhanced Reload Feedback: The /agents refresh command now provides a detailed summary of the reload operation, including counts of local and remote agents, lists of new and updated agents, and any errors encountered.
  • State Tracking: Implemented metadata hash comparison in AgentRegistry to accurately identify which agents have been added or updated during a reload.
  • Error Handling: Improved error collection during the agent loading process to capture and report issues without interrupting the entire reload sequence.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

Size Change: +1.21 kB (0%)

Total Size: 33.9 MB

Filename Size Change
./bundle/chunk-2NYUELT4.js 0 B -2.72 MB (removed) 🏆
./bundle/chunk-45ACX5FA.js 0 B -3.8 kB (removed) 🏆
./bundle/chunk-DIJJRSWM.js 0 B -12.5 kB (removed) 🏆
./bundle/chunk-EDUNVPH3.js 0 B -657 kB (removed) 🏆
./bundle/chunk-KNOM2IUH.js 0 B -3.43 kB (removed) 🏆
./bundle/chunk-ODIOCWI6.js 0 B -14.7 MB (removed) 🏆
./bundle/chunk-PPD56YFM.js 0 B -19.5 kB (removed) 🏆
./bundle/chunk-XNNO7ZMD.js 0 B -49.2 kB (removed) 🏆
./bundle/core-QEQR3OQG.js 0 B -48.4 kB (removed) 🏆
./bundle/devtoolsService-S7H3ZTK6.js 0 B -28 kB (removed) 🏆
./bundle/gemini-EOWUYHUI.js 0 B -582 kB (removed) 🏆
./bundle/interactiveCli-UNDWFVBQ.js 0 B -1.32 MB (removed) 🏆
./bundle/liteRtServerManager-ZAIATVPR.js 0 B -2.11 kB (removed) 🏆
./bundle/oauth2-provider-NJWPAIUH.js 0 B -9.16 kB (removed) 🏆
./bundle/chunk-27BCH35S.js 12.5 kB +12.5 kB (new file) 🆕
./bundle/chunk-5GEXW2CH.js 657 kB +657 kB (new file) 🆕
./bundle/chunk-FTZCM5OZ.js 19.5 kB +19.5 kB (new file) 🆕
./bundle/chunk-FUL7ZAN3.js 3.43 kB +3.43 kB (new file) 🆕
./bundle/chunk-JQCNJIHM.js 49.2 kB +49.2 kB (new file) 🆕
./bundle/chunk-TVTNH77Q.js 2.72 MB +2.72 MB (new file) 🆕
./bundle/chunk-V6NBO7HG.js 3.8 kB +3.8 kB (new file) 🆕
./bundle/chunk-XIBGXD2Y.js 14.7 MB +14.7 MB (new file) 🆕
./bundle/core-XPMIMEYG.js 48.4 kB +48.4 kB (new file) 🆕
./bundle/devtoolsService-4PNTXSDH.js 28 kB +28 kB (new file) 🆕
./bundle/gemini-AOHQAQP5.js 582 kB +582 kB (new file) 🆕
./bundle/interactiveCli-MW3OMWW3.js 1.32 MB +1.32 MB (new file) 🆕
./bundle/liteRtServerManager-46RUKXYZ.js 2.11 kB +2.11 kB (new file) 🆕
./bundle/oauth2-provider-DMFWLR2L.js 9.16 kB +9.16 kB (new file) 🆕
ℹ️ View Unchanged
Filename Size Change
./bundle/bundled/third_party/index.js 8 MB 0 B
./bundle/chunk-34MYV7JD.js 2.45 kB 0 B
./bundle/chunk-5AUYMPVF.js 858 B 0 B
./bundle/chunk-5PS3AYFU.js 1.18 kB 0 B
./bundle/chunk-664ZODQF.js 124 kB 0 B
./bundle/chunk-DAHVX5MI.js 206 kB 0 B
./bundle/chunk-DD4MWEAB.js 1.97 MB 0 B
./bundle/chunk-IUUIT4SU.js 56.5 kB 0 B
./bundle/chunk-RJTRUG2J.js 39.8 kB 0 B
./bundle/cleanup-VKDR6L4H.js 0 B -932 B (removed) 🏆
./bundle/devtools-36NN55EP.js 696 kB 0 B
./bundle/dist-T73EYRDX.js 356 B 0 B
./bundle/events-XB7DADIJ.js 418 B 0 B
./bundle/examples/hooks/scripts/on-start.js 188 B 0 B
./bundle/examples/mcp-server/example.js 1.43 kB 0 B
./bundle/gemini.js 5.1 kB 0 B
./bundle/getMachineId-bsd-TXG52NKR.js 1.55 kB 0 B
./bundle/getMachineId-darwin-7OE4DDZ6.js 1.55 kB 0 B
./bundle/getMachineId-linux-SHIFKOOX.js 1.34 kB 0 B
./bundle/getMachineId-unsupported-5U5DOEYY.js 1.06 kB 0 B
./bundle/getMachineId-win-6KLLGOI4.js 1.72 kB 0 B
./bundle/memoryDiscovery-HRURE3F3.js 980 B 0 B
./bundle/multipart-parser-KPBZEGQU.js 11.7 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/client/main.js 222 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js 229 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.js 13.4 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/types.js 132 B 0 B
./bundle/sandbox-macos-permissive-open.sb 890 B 0 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB 0 B
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB 0 B
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB 0 B
./bundle/sandbox-macos-strict-open.sb 4.82 kB 0 B
./bundle/sandbox-macos-strict-proxied.sb 5.02 kB 0 B
./bundle/src-QVCVGIUX.js 47 kB 0 B
./bundle/start-IBU24OCT.js 0 B -652 B (removed) 🏆
./bundle/tree-sitter-7U6MW5PS.js 274 kB 0 B
./bundle/tree-sitter-bash-34ZGLXVX.js 1.84 MB 0 B
./bundle/cleanup-ADUGL3DD.js 932 B +932 B (new file) 🆕
./bundle/start-3P6QEGWP.js 652 B +652 B (new file) 🆕

compressed-size-action

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request enhances the agent reload process by returning a detailed AgentReloadSummary, which includes counts for local and remote agents as well as lists of new and updated agents. The CLI has been updated to display this summary to the user. Review feedback suggests avoiding the use of a global event listener for error tracking to prevent race conditions in concurrent environments and recommends using metadata hashes instead of JSON stringification for more efficient and accurate detection of agent updates.

Comment thread packages/core/src/agents/registry.ts Outdated
Comment thread packages/core/src/agents/registry.ts Outdated
@gemini-cli gemini-cli Bot added the 🔒 maintainer only ⛔ Do not contribute. Internal roadmap item. label May 4, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

Size Change: +1.21 kB (0%)

Total Size: 33.9 MB

Filename Size Change
./bundle/chunk-2NYUELT4.js 0 B -2.72 MB (removed) 🏆
./bundle/chunk-45ACX5FA.js 0 B -3.8 kB (removed) 🏆
./bundle/chunk-DIJJRSWM.js 0 B -12.5 kB (removed) 🏆
./bundle/chunk-EDUNVPH3.js 0 B -657 kB (removed) 🏆
./bundle/chunk-KNOM2IUH.js 0 B -3.43 kB (removed) 🏆
./bundle/chunk-ODIOCWI6.js 0 B -14.7 MB (removed) 🏆
./bundle/chunk-PPD56YFM.js 0 B -19.5 kB (removed) 🏆
./bundle/chunk-XNNO7ZMD.js 0 B -49.2 kB (removed) 🏆
./bundle/core-QEQR3OQG.js 0 B -48.4 kB (removed) 🏆
./bundle/devtoolsService-S7H3ZTK6.js 0 B -28 kB (removed) 🏆
./bundle/gemini-EOWUYHUI.js 0 B -582 kB (removed) 🏆
./bundle/interactiveCli-UNDWFVBQ.js 0 B -1.32 MB (removed) 🏆
./bundle/liteRtServerManager-ZAIATVPR.js 0 B -2.11 kB (removed) 🏆
./bundle/oauth2-provider-NJWPAIUH.js 0 B -9.16 kB (removed) 🏆
./bundle/chunk-4SZMKNLY.js 19.5 kB +19.5 kB (new file) 🆕
./bundle/chunk-DYXT3HBV.js 657 kB +657 kB (new file) 🆕
./bundle/chunk-FE5EDANS.js 3.8 kB +3.8 kB (new file) 🆕
./bundle/chunk-FSL442IB.js 3.43 kB +3.43 kB (new file) 🆕
./bundle/chunk-GRKHUHQY.js 12.5 kB +12.5 kB (new file) 🆕
./bundle/chunk-JT7RO2NM.js 14.7 MB +14.7 MB (new file) 🆕
./bundle/chunk-VHORGHMV.js 49.2 kB +49.2 kB (new file) 🆕
./bundle/chunk-XIYOKE6O.js 2.72 MB +2.72 MB (new file) 🆕
./bundle/core-NSUEQCXE.js 48.4 kB +48.4 kB (new file) 🆕
./bundle/devtoolsService-3QOLORVV.js 28 kB +28 kB (new file) 🆕
./bundle/gemini-U5J5JMMQ.js 582 kB +582 kB (new file) 🆕
./bundle/interactiveCli-PQDKY724.js 1.32 MB +1.32 MB (new file) 🆕
./bundle/liteRtServerManager-DBYRVM6Q.js 2.11 kB +2.11 kB (new file) 🆕
./bundle/oauth2-provider-ZLLR5XAL.js 9.16 kB +9.16 kB (new file) 🆕
ℹ️ View Unchanged
Filename Size Change
./bundle/bundled/third_party/index.js 8 MB 0 B
./bundle/chunk-34MYV7JD.js 2.45 kB 0 B
./bundle/chunk-5AUYMPVF.js 858 B 0 B
./bundle/chunk-5PS3AYFU.js 1.18 kB 0 B
./bundle/chunk-664ZODQF.js 124 kB 0 B
./bundle/chunk-DAHVX5MI.js 206 kB 0 B
./bundle/chunk-DD4MWEAB.js 1.97 MB 0 B
./bundle/chunk-IUUIT4SU.js 56.5 kB 0 B
./bundle/chunk-RJTRUG2J.js 39.8 kB 0 B
./bundle/cleanup-VKDR6L4H.js 0 B -932 B (removed) 🏆
./bundle/devtools-36NN55EP.js 696 kB 0 B
./bundle/dist-T73EYRDX.js 356 B 0 B
./bundle/events-XB7DADIJ.js 418 B 0 B
./bundle/examples/hooks/scripts/on-start.js 188 B 0 B
./bundle/examples/mcp-server/example.js 1.43 kB 0 B
./bundle/gemini.js 5.1 kB 0 B
./bundle/getMachineId-bsd-TXG52NKR.js 1.55 kB 0 B
./bundle/getMachineId-darwin-7OE4DDZ6.js 1.55 kB 0 B
./bundle/getMachineId-linux-SHIFKOOX.js 1.34 kB 0 B
./bundle/getMachineId-unsupported-5U5DOEYY.js 1.06 kB 0 B
./bundle/getMachineId-win-6KLLGOI4.js 1.72 kB 0 B
./bundle/memoryDiscovery-HRURE3F3.js 980 B 0 B
./bundle/multipart-parser-KPBZEGQU.js 11.7 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/client/main.js 222 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js 229 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.js 13.4 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/types.js 132 B 0 B
./bundle/sandbox-macos-permissive-open.sb 890 B 0 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB 0 B
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB 0 B
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB 0 B
./bundle/sandbox-macos-strict-open.sb 4.82 kB 0 B
./bundle/sandbox-macos-strict-proxied.sb 5.02 kB 0 B
./bundle/src-QVCVGIUX.js 47 kB 0 B
./bundle/start-IBU24OCT.js 0 B -652 B (removed) 🏆
./bundle/tree-sitter-7U6MW5PS.js 274 kB 0 B
./bundle/tree-sitter-bash-34ZGLXVX.js 1.84 MB 0 B
./bundle/cleanup-3CHQ6SCA.js 932 B +932 B (new file) 🆕
./bundle/start-2G4D7X5E.js 652 B +652 B (new file) 🆕

compressed-size-action

@cocosheng-g
Copy link
Copy Markdown
Contributor Author

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request enhances the agent reload process by introducing an AgentReloadSummary that provides detailed information about the operation, including agent counts, lists of new or updated agents based on metadata hashes, and any errors encountered. The CLI UI is updated to present this summary to the user. Feedback points out redundant map clearing in the reload method and suggests optimizing the agent count calculation into a single pass. A security concern regarding the implementation of cryptographic hash verification for remote agents to prevent TOCTOU vulnerabilities was also raised.

Comment thread packages/core/src/agents/registry.ts Outdated
Comment thread packages/core/src/agents/registry.ts
Comment thread packages/core/src/agents/registry.ts
@cocosheng-g cocosheng-g force-pushed the feat/improve-agents-refresh-logging-16272 branch from a28f5fb to 7a5d7d6 Compare May 4, 2026 15:43
@cocosheng-g
Copy link
Copy Markdown
Contributor Author

/gemini review

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

Size Change: +1.88 kB (+0.01%)

Total Size: 33.9 MB

Filename Size Change
./bundle/chunk-4GNSP4BA.js 0 B -657 kB (removed) 🏆
./bundle/chunk-66RGOXLC.js 0 B -3.8 kB (removed) 🏆
./bundle/chunk-6TVQPL5E.js 0 B -14.7 MB (removed) 🏆
./bundle/chunk-FINZ6FKL.js 0 B -12.5 kB (removed) 🏆
./bundle/chunk-HTRKXPKC.js 0 B -2.72 MB (removed) 🏆
./bundle/chunk-LZRZAXJW.js 0 B -19.5 kB (removed) 🏆
./bundle/chunk-U7TMYQFN.js 0 B -3.43 kB (removed) 🏆
./bundle/chunk-Y5IPEF6V.js 0 B -49.2 kB (removed) 🏆
./bundle/core-NDRGGIDT.js 0 B -48.5 kB (removed) 🏆
./bundle/devtoolsService-BFNUIBRQ.js 0 B -28 kB (removed) 🏆
./bundle/gemini-OTJE2HI2.js 0 B -582 kB (removed) 🏆
./bundle/interactiveCli-BD63SNDG.js 0 B -1.33 MB (removed) 🏆
./bundle/liteRtServerManager-7MV4XTJY.js 0 B -2.11 kB (removed) 🏆
./bundle/oauth2-provider-KYGC3MCI.js 0 B -9.16 kB (removed) 🏆
./bundle/chunk-32LTBEAD.js 19.5 kB +19.5 kB (new file) 🆕
./bundle/chunk-4FZVFLDN.js 49.2 kB +49.2 kB (new file) 🆕
./bundle/chunk-6T3FE7CI.js 2.72 MB +2.72 MB (new file) 🆕
./bundle/chunk-IMVQ36HE.js 3.8 kB +3.8 kB (new file) 🆕
./bundle/chunk-N3KX6MTN.js 14.7 MB +14.7 MB (new file) 🆕
./bundle/chunk-OP2DU5QK.js 3.43 kB +3.43 kB (new file) 🆕
./bundle/chunk-RIFAR4Q2.js 657 kB +657 kB (new file) 🆕
./bundle/chunk-TAPPM5GE.js 12.5 kB +12.5 kB (new file) 🆕
./bundle/core-ZM4Q6EY2.js 48.5 kB +48.5 kB (new file) 🆕
./bundle/devtoolsService-5Z27H256.js 28 kB +28 kB (new file) 🆕
./bundle/gemini-BBE7VX3G.js 582 kB +582 kB (new file) 🆕
./bundle/interactiveCli-QQCVGESO.js 1.33 MB +1.33 MB (new file) 🆕
./bundle/liteRtServerManager-5D6TOS3H.js 2.11 kB +2.11 kB (new file) 🆕
./bundle/oauth2-provider-ONE5YNIC.js 9.16 kB +9.16 kB (new file) 🆕
ℹ️ View Unchanged
Filename Size Change
./bundle/bundled/third_party/index.js 8 MB 0 B
./bundle/chunk-34MYV7JD.js 2.45 kB 0 B
./bundle/chunk-5AUYMPVF.js 858 B 0 B
./bundle/chunk-5PS3AYFU.js 1.18 kB 0 B
./bundle/chunk-664ZODQF.js 124 kB 0 B
./bundle/chunk-DAHVX5MI.js 206 kB 0 B
./bundle/chunk-DD4MWEAB.js 1.97 MB 0 B
./bundle/chunk-IUUIT4SU.js 56.5 kB 0 B
./bundle/chunk-RJTRUG2J.js 39.8 kB 0 B
./bundle/cleanup-IUJL64TV.js 0 B -932 B (removed) 🏆
./bundle/devtools-36NN55EP.js 696 kB 0 B
./bundle/dist-T73EYRDX.js 356 B 0 B
./bundle/events-XB7DADIJ.js 418 B 0 B
./bundle/examples/hooks/scripts/on-start.js 188 B 0 B
./bundle/examples/mcp-server/example.js 1.43 kB 0 B
./bundle/gemini.js 5.1 kB 0 B
./bundle/getMachineId-bsd-TXG52NKR.js 1.55 kB 0 B
./bundle/getMachineId-darwin-7OE4DDZ6.js 1.55 kB 0 B
./bundle/getMachineId-linux-SHIFKOOX.js 1.34 kB 0 B
./bundle/getMachineId-unsupported-5U5DOEYY.js 1.06 kB 0 B
./bundle/getMachineId-win-6KLLGOI4.js 1.72 kB 0 B
./bundle/memoryDiscovery-HRURE3F3.js 980 B 0 B
./bundle/multipart-parser-KPBZEGQU.js 11.7 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/client/main.js 222 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js 229 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.js 13.4 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/types.js 132 B 0 B
./bundle/sandbox-macos-permissive-open.sb 890 B 0 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB 0 B
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB 0 B
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB 0 B
./bundle/sandbox-macos-strict-open.sb 4.82 kB 0 B
./bundle/sandbox-macos-strict-proxied.sb 5.02 kB 0 B
./bundle/src-QVCVGIUX.js 47 kB 0 B
./bundle/start-AWD5RU2B.js 0 B -652 B (removed) 🏆
./bundle/tree-sitter-7U6MW5PS.js 274 kB 0 B
./bundle/tree-sitter-bash-34ZGLXVX.js 1.84 MB 0 B
./bundle/cleanup-6ENVHCY5.js 932 B +932 B (new file) 🆕
./bundle/start-RSJHO2ZP.js 652 B +652 B (new file) 🆕

compressed-size-action

@devr0306
Copy link
Copy Markdown
Contributor

devr0306 commented May 4, 2026

From /review-frontend

Thanks for this PR! The detailed summary for the /agents refresh command is a great UX improvement. The logic is cleanly separated between Core and the CLI.

I noticed a few minor items that we should consider before merging:

  1. Remote Agent Hash Changes: In registry.ts, ensureRemoteAgentHash now computes a SHA-256 hash for remote agents with an agentCardUrl. Previously, the raw URL was used. This is a cleaner approach, but it will invalidate previously acknowledged remote agents, causing users to be reprompted. You may want to mention this in the PR description or add a note about it.
  2. Deleted Agents: The AgentReloadSummary tracks newAgents and updatedAgents, but not removed agents. Since you already have the previousAgents map, it might be nice to include deletedAgents in the summary for completeness.
  3. Error Messaging: In agentsCommand.ts, the output always starts with "Agents reloaded successfully:", even if errors occurred (e.g., summary.errors.length > 0). It might be clearer to change this to "Agents reloaded:" or "Agents reloaded with errors:" when errors are present.

Great work on improving the error collection and display!

@cocosheng-g
Copy link
Copy Markdown
Contributor Author

addressed all!

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

69 tests passed successfully on gemini-3-flash-preview.

🧠 Model Steering Guidance

This PR modifies files that affect the model's behavior (prompts, tools, or instructions).

  • ⚠️ Consider adding Evals: No behavioral evaluations (evals/*.eval.ts) were added or updated in this PR. Consider adding a test case to verify the new behavior and prevent regressions.
  • 🚀 Maintainer Reminder: Please ensure that these changes do not regress results on benchmark evals before merging.

This is an automated guidance message triggered by steering logic signatures.

Copy link
Copy Markdown
Contributor

@devr0306 devr0306 left a comment

Choose a reason for hiding this comment

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

LGTM

@cocosheng-g cocosheng-g enabled auto-merge May 4, 2026 19:11
@cocosheng-g cocosheng-g force-pushed the feat/improve-agents-refresh-logging-16272 branch from 67e2a5a to 43bb8dc Compare May 4, 2026 19:12
@cocosheng-g cocosheng-g added this pull request to the merge queue May 4, 2026
Merged via the queue into main with commit 0d6bd29 May 4, 2026
46 of 49 checks passed
@cocosheng-g cocosheng-g deleted the feat/improve-agents-refresh-logging-16272 branch May 4, 2026 19:54
TirthNaik-99 pushed a commit to TirthNaik-99/gemini-cli that referenced this pull request May 4, 2026
kimjune01 pushed a commit to kimjune01/gemini-cli-claude that referenced this pull request May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔒 maintainer only ⛔ Do not contribute. Internal roadmap item.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improving logging on agents refresh

2 participants