Skip to content

Fix stray dir creation with api server issue6667 - #6712

Open
llalitkumarrr wants to merge 7 commits into
google:mainfrom
llalitkumarrr:fix-stray-dir-creation-with-api-server-issue6667
Open

Fix stray dir creation with api server issue6667#6712
llalitkumarrr wants to merge 7 commits into
google:mainfrom
llalitkumarrr:fix-stray-dir-creation-with-api-server-issue6667

Conversation

@llalitkumarrr

@llalitkumarrr llalitkumarrr commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

1. Link to an existing issue (if applicable):

2. Or, if no issue exists, describe the change:
Created AgentAppMapping to load dictionary that searches the filesystem to correctly map an internal app name to its physical folder path when requested. Removed a hardcoded dict() cast in local_storage.py so the dynamic map isn't prematurely evaluated into an empty dictionary, and added test cases to ensure the map gracefully handles missing agents and load errors.

Problem:
When an App's name differs from its on-disk agent directory name, the local storage services create <agents_dir>/<app_name>/.adk/.... Because <app_name> is not a dotted name, AgentLoader.list_agents() picks it up as an agent directory, advertises it, and then fails to load it.

Solution:
A clear and concise description of what you want to happen and why you choose
this solution.

Testing Plan

Unit Tests:

  • I have added or updated unit tests for my change in tests/unittests/cli/test_fast_api.py.
  • All unit tests pass locally.

Please include a summary of passed pytest results.
102 test passed with 10 warnings.

@adk-bot adk-bot added the cli [Component] This issue is related to cli label Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli [Component] This issue is related to cli

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stray <app_name> directory created under agents_dir on server paths becomes a phantom agent in list_agents()

3 participants