Description
Once you convert your agent's inbound auth from Sigv4 to OAuth and forget to provide a Session ID, the CLI should return more verbose message such as Please specify session ID or, better yet, generate automatically.
agentcore invoke --bearer-token $BEARER_TOKEN "<your prompt>"
Error: 1 validation error for AgentCoreMemoryConfig
session_id
Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
For further information visit https://errors.pydantic.dev/2.13/v/string_type
Log: /home/sagemaker-user/agentcore-runtime-quickstart/personalAgent/agentcore/.cli/logs/invoke/invoke-personalAgent-20260414-035442.log
Steps to Reproduce
- Deploy agent with Sigv4 inbound auth
- Switch auth to OAuth (I was using Cognito User Pools)
- Generate validate bearer token and forget to pass session ID to invoke function
Expected Behavior
Either:
- CLI generates valid session ID
- CLI errors "Error: please provide valid session Id using
--session-id
Actual Behavior
Error: 1 validation error for AgentCoreMemoryConfig
session_id
Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
For further information visit https://errors.pydantic.dev/2.13/v/string_type
Log: /home/sagemaker-user/agentcore-runtime-quickstart/personalAgent/agentcore/.cli/logs/invoke/invoke-personalAgent-20260414-035442.log
CLI Version
No response
Operating System
macOS
Additional Context
No response
Description
Once you convert your agent's inbound auth from Sigv4 to OAuth and forget to provide a Session ID, the CLI should return more verbose message such as
Please specify session IDor, better yet, generate automatically.agentcore invoke --bearer-token $BEARER_TOKEN "<your prompt>"Steps to Reproduce
Expected Behavior
Either:
--session-idActual Behavior
CLI Version
No response
Operating System
macOS
Additional Context
No response