You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Impossible to resume agents throught fastapi endpoint without "new_message" #4100
changed the title [-]Impossible to resume agents throught fastapi endpoint with[/-][+]Impossible to resume agents throught fastapi endpoint without "new_message"[/+]on Jan 9, 2026
I'd like to help fix this FastAPI session resume issue. I've been working on the ADK adapters and would like to ensure the session state flow is working correctly for web deployments. Can I take this on?
Hi @wuliang229, I see you've self-assigned this and moved it to core. I was planning to look into the FastAPI side of this flow. If there are specific parts of the fix you'd like to delegate, or if you'd like me to help with testing the FastAPI integration once the core fix is ready, please let me know!
Otherwise, I'll look for another open issue to help with. Thanks!
@Armadindon Thanks for reporting!
Making new_message optional in the FastAPI request model fixes this issue. Currently, FastAPI requires new_message because it is defined as a mandatory field, so resume requests that only provide invocation_id fail validation before reaching the resume logic. Resume flows do not represent a new user input, so they should not require a message. Defining new_message as Optional[types.Content] = None allows FastAPI to accept resume requests and correctly pass them to the existing resume implementation, which already works as documented.
Thank you.
@Akshat8510 Hi, feel free to raise any PRs that you think would fix this and any other issues that you find yourself interested in solving. Please do follow the ADK contribution guide. The ADK team will promptly review the PRs.
Hi @Armadindon , I’ve raised PR #4185 to resolve this. It makes new_message optional in the request model and updates the runner logic to handle resumption gracefully. Ready for review!
My PR (#4185) specifically addresses the bug where the API schema itself was blocking resume requests (the 422 error), which was the first major hurdle
Regarding your point: currently, resumability is typically defined within the Agent/App definition itself before it’s wrapped. However, adding a flag to get_fast_api_app to make this more accessible via the CLI/Web wrapper is a great candidate for a follow-up feature request. I’d be happy to look into that once this blocker is cleared!
Activity
[-]Impossible to resume agents throught fastapi endpoint with[/-][+]Impossible to resume agents throught fastapi endpoint without "new_message"[/+]Akshat8510 commentedon Jan 9, 2026
I'd like to help fix this FastAPI session resume issue. I've been working on the ADK adapters and would like to ensure the session state flow is working correctly for web deployments. Can I take this on?
Akshat8510 commentedon Jan 10, 2026
Hi @wuliang229, I see you've self-assigned this and moved it to core. I was planning to look into the FastAPI side of this flow. If there are specific parts of the fix you'd like to delegate, or if you'd like me to help with testing the FastAPI integration once the core fix is ready, please let me know!
Otherwise, I'll look for another open issue to help with. Thanks!
klateefa commentedon Jan 12, 2026
@Armadindon Thanks for reporting!
Making
new_messageoptional in the FastAPI request model fixes this issue. Currently, FastAPI requiresnew_messagebecause it is defined as a mandatory field, so resume requests that only provideinvocation_idfail validation before reaching the resume logic. Resume flows do not represent a new user input, so they should not require a message. Defining new_message asOptional[types.Content] = Noneallows FastAPI to accept resume requests and correctly pass them to the existing resume implementation, which already works as documented.Thank you.
wuliang229 commentedon Jan 12, 2026
@Akshat8510 Hi, feel free to raise any PRs that you think would fix this and any other issues that you find yourself interested in solving. Please do follow the ADK contribution guide. The ADK team will promptly review the PRs.
Armadindon commentedon Jan 13, 2026
Thanks a lot ! 🙏 Didn't have time to do the change this weekend :)
Akshat8510 commentedon Jan 20, 2026
Hi @Armadindon , I’ve raised PR #4185 to resolve this. It makes new_message optional in the request model and updates the runner logic to handle resumption gracefully. Ready for review!
veevortexiq commentedon Jan 21, 2026
How Do you add resumability config to fast_api_app wrapped agent?
Currently there's no flag / config Variable in
[adk-python]/[src]/[google]/[adk]/[cli]/fast_api.py
to add this :
Akshat8510 commentedon Jan 21, 2026
That’s a great point, @veevortexiq. You're right that get_fast_api_app currently lacks a direct flag to pass resumability_config.
Akshat8510 commentedon Jan 21, 2026
My PR (#4185) specifically addresses the bug where the API schema itself was blocking resume requests (the 422 error), which was the first major hurdle
Akshat8510 commentedon Jan 21, 2026
Regarding your point: currently, resumability is typically defined within the Agent/App definition itself before it’s wrapped. However, adding a flag to get_fast_api_app to make this more accessible via the CLI/Web wrapper is a great candidate for a follow-up feature request. I’d be happy to look into that once this blocker is cleared!
veevortexiq commentedon Jan 21, 2026
Thank you @Akshat8510
fix(web): allow session resume without new message
fix(web): allow session resume without new message
fix(web): allow session resume without new message