-
feat(cli): send x-cli-session-id header on every request (#3430)
发布于
2026-05-16 20:47:21 +00:00 Summary
- Pulls the per-cwd CLI session id (already generated by
getCurrentCwdSessionId()and used ascli_session_idon analytics
events) and attaches it as thex-cli-session-idheader on every
request from the composio client. - Backend reads the header off
requestInfo, threads it through
enrichSessionInfo, and writessession_info.cli_session_idon every
tool execution log row.
Companion hermes PR: ComposioHQ/hermes#9990
Why
The CLI already tracks a stable per-cwd session id for analytics, but
tool execution logs are blind to it — there's no way to filter the logs
UI / retool back to a single CLI session. Wiring the header through lets
us group all tool calls from one CLI workflow together.Test plan
pnpm --filter @composio/cli typecheckclean- Run
composio tools execute <slug>against a build with the
hermes companion deployed, confirm ClickHouse tool log has
session_info.cli_session_id - Confirm header is absent (and log field absent) when no cwd
session is cached
🤖 Generated with Claude Code
Co-authored-by: Claude Opus 4.7 (1M context) noreply@anthropic.com
下载附件
- Pulls the per-cwd CLI session id (already generated by