Step affected
Step 7 — "Chat with your agent!"
Description
When running adk web in Google Cloud Shell and accessing the UI via Web Preview (port 8000), the ADK web server returns a 403 Forbidden error on session creation:
POST /apps/mcp_bakery_app/users/user/sessions HTTP/1.1" 403 Forbidden
This is caused by Cloud Shell proxying requests through a *.cloudshell.dev domain, which ADK's default CORS/origin check blocks.
Fix
The codelab should instruct users to run adk web with the --allow_origins flag:
adk web --allow_origins "regex:https://.*\.cloudshell\.dev"
Steps to reproduce
- Follow the codelab in Google Cloud Shell
- Run
adk web as instructed
- Open the UI via Web Preview → port 8000
- Observe 403 on session creation — the chat interface does not load
Expected behavior
The codelab should include the --allow_origins flag in the adk web command, or add a note explaining this is required when using Cloud Shell Web Preview.