Description
When using agentcore invoke with --session-id, the local CLI log files always record Session ID: none in the header. The session ID is correctly sent to Runtime (confirmed via CloudWatch GenAI Observability sessions console), so this is a logging-only issue.
Steps to Reproduce
- Run
agentcore invoke "Testing session ID logging" --session-id test-session-id-logging-000000001 --stream
- Check the local log file in
<project>/agentcore/.cli/logs/invoke/
Expected Behavior
Log header shows Session ID: test-session-id-logging-000000001.
Actual Behavior
Log header shows Session ID: none:
================================================================================
AGENTCORE INVOKE LOG
Agent: itresearchagent
Session ID: none
Started: 2026-04-19T10:43:13.160Z
================================================================================
[11:43:13.161] INVOKE REQUEST (Session: none)
--- REQUEST ---
{
"timestamp": "2026-04-19T10:43:13.161Z",
"agent": "itresearchagent",
"runtimeArn": "arn:aws:bedrock-agentcore:eu-west-1:...",
"region": "eu-west-1",
"prompt": "Testing session ID logging"
}
The session ID does reach Runtime — it appears correctly in the CloudWatch GenAI Observability sessions view.
Related
CLI Version
0.9.1 (@aws/agentcore)
Operating System
macOS
Description
When using
agentcore invokewith--session-id, the local CLI log files always recordSession ID: nonein the header. The session ID is correctly sent to Runtime (confirmed via CloudWatch GenAI Observability sessions console), so this is a logging-only issue.Steps to Reproduce
agentcore invoke "Testing session ID logging" --session-id test-session-id-logging-000000001 --stream<project>/agentcore/.cli/logs/invoke/Expected Behavior
Log header shows
Session ID: test-session-id-logging-000000001.Actual Behavior
Log header shows
Session ID: none:The session ID does reach Runtime — it appears correctly in the CloudWatch GenAI Observability sessions view.
Related
agentcore invoke --stream#664 — Session ID not returned afteragentcore invoke --streamCLI Version
0.9.1 (
@aws/agentcore)Operating System
macOS