Skip to content
Discussion options

You must be logged in to vote

Response from ADK Answering Agent (experimental, answer may be inaccurate)

TLDR: The RuntimeError you're seeing is caused by an asyncio task conflict between the LoopAgent and the interactive credential request. The correct approach is to handle the authentication flow outside the agent's execution loop by pausing the agent when it requests credentials and then resuming it with the authentication details in a new run.


Hi there,

This is a great question. The issue you're encountering, RuntimeError: Attempted to exit cancel scope in a different task than it was entered in, is a known problem when dealing with asyncio tasks in complex agent loops, especially with older versions of Python.

T…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by guilmour
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants