Skip to content

fix(cli): reload changed agent correctly - #6727

Open
gioboa wants to merge 1 commit into
google:mainfrom
gioboa:fix/4956
Open

fix(cli): reload changed agent correctly#6727
gioboa wants to merge 1 commit into
google:mainfrom
gioboa:fix/4956

Conversation

@gioboa

@gioboa gioboa commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Close #4956

Problem:

When agent hot reload detected a modified file, it reloaded the agent currently open in ADK Web instead of the agent that owned the modified file.

Solution:

Pass the agents directory to AgentChangeEventHandler and derive the affected agent name from the modified file path. This keeps the fix local to hot reload and avoids changing any supported public API or CLI option.

Testing Plan

Please describe the tests that you ran to verify your changes. This is required
for all PRs that are not small documentation or typo fixes.

Unit Tests:

  • I have added or updated unit tests for my change.
  • All unit tests pass locally.
tests/unittests/cli/utils/test_agent_change_handler.py
9 passed

tests/unittests
11879 passed, 92 skipped, 25 xfailed, 1 xpassed, 19 subtests passed

Manual End-to-End (E2E) Tests:

Create a two-agent setup, read agent B’s metadata via GET /apps/agent_b/app-info, modify its description, then verify the endpoint returns the updated metadata.

Checklist

  • I have read the CONTRIBUTING.md document.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have manually tested my changes end-to-end.
  • Any dependent changes have been merged and published in downstream modules.

Additional context

No documentation changes are required.

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.

reload_agents reload current_app_name_ref?

2 participants