Skip to content

Claude Code. Any Model. The most powerful AI coding agent now speaks every language.

test(advisor): add S0 captures of the Claude login-arm request shapes

Jack Rudenko9d1d2f320743
diff --git a/packages/cli/src/test-fixtures/advisor/inbound-authbetas.jsonl b/packages/cli/src/test-fixtures/advisor/inbound-authbetas.jsonl
new file mode 100644
index 00000000..bff24911
--- /dev/null
+++ b/packages/cli/src/test-fixtures/advisor/inbound-authbetas.jsonl
@@ -0,0 +1,13 @@
+{"at":"2026-10-20T22:27:10.362Z","label":"authbetas","method":"HEAD","path":"/api/hello","query":"","headers":{"accept":"*/*","accept-encoding":"gzip, deflate, br, zstd","connection":"keep-alive","host":"127.0.0.1:47811","user-agent":"Bun/1.4.4"},"body":{"parsed":false},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:27:12.200Z","label":"authbetas","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,redact-thinking-2026-02-12,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,oauth-2025-04-20,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,effort-2025-11-24,structured-outputs-2025-12-15","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=27> class=other","connection":"keep-alive","content-length":"4051","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"c98d5241-32d1-48de-9bfa-2e1aada0f39d","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":null,"output_config":{"effort":"medium","format":{"type":"json_schema","schema":{"type":"object","properties":{"title":{"type":"string"}},"required":["title"],"additionalProperties":false}}},"context_management":null,"metadata":{"user_id":"<string len=150>"},"toolsCount":0,"messagesCount":1,"firstUserTextHead":"<session>\nReply with the single word OK.\n</session>\n\nWrite the title in the predominant language of the session — a stray word or code token in another language","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.10a; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":null,"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":null,"len":3059,"matchesBillingRe":false,"oneLine":false,"text":"<3059 chars, first line: \"You are naming a coding session so the user can pick it out of a long list of se\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:27:12.511Z","label":"authbetas","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,oauth-2025-04-20,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=27> class=other","connection":"keep-alive","content-length":"156084","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"c98d5241-32d1-48de-9bfa-2e1aada0f39d","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","thinking","context_management","safeguards","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":{"type":"adaptive","display":"updates"},"output_config":{"effort":"medium"},"context_management":["edits"],"metadata":{"user_id":"<string len=150>"},"toolsCount":15,"messagesCount":2,"firstUserTextHead":"<system-reminder>\nCodebase and user instructions are shown below. Be sure to adhere to these instructions. IMPORTANT: These instructions OVERRIDE any default be","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.b15; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":{"type":"ephemeral"},"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":{"type":"ephemeral"},"len":7555,"matchesBillingRe":false,"oneLine":false,"text":"<7555 chars, first line: \"\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:27:12.810Z","label":"authbetas","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,redact-thinking-2026-02-12,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,oauth-2025-04-20,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,effort-2025-11-24,structured-outputs-2025-12-15","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=27> class=other","connection":"keep-alive","content-length":"4051","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"c98d5241-32d1-48de-9bfa-2e1aada0f39d","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":null,"output_config":{"effort":"medium","format":{"type":"json_schema","schema":{"type":"object","properties":{"title":{"type":"string"}},"required":["title"],"additionalProperties":false}}},"context_management":null,"metadata":{"user_id":"<string len=150>"},"toolsCount":0,"messagesCount":1,"firstUserTextHead":"<session>\nReply with the single word OK.\n</session>\n\nWrite the title in the predominant language of the session — a stray word or code token in another language","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.10a; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":null,"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":null,"len":3059,"matchesBillingRe":false,"oneLine":false,"text":"<3059 chars, first line: \"You are naming a coding session so the user can pick it out of a long list of se\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:27:13.025Z","label":"authbetas","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,oauth-2025-04-20,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=27> class=other","connection":"keep-alive","content-length":"156084","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"c98d5241-32d1-48de-9bfa-2e1aada0f39d","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","thinking","context_management","safeguards","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":{"type":"adaptive","display":"updates"},"output_config":{"effort":"medium"},"context_management":["edits"],"metadata":{"user_id":"<string len=150>"},"toolsCount":15,"messagesCount":2,"firstUserTextHead":"<system-reminder>\nCodebase and user instructions are shown below. Be sure to adhere to these instructions. IMPORTANT: These instructions OVERRIDE any default be","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.b15; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":{"type":"ephemeral"},"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":{"type":"ephemeral"},"len":7555,"matchesBillingRe":false,"oneLine":false,"text":"<7555 chars, first line: \"\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:27:14.049Z","label":"authbetas","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,redact-thinking-2026-02-12,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,oauth-2025-04-20,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,effort-2025-11-24,structured-outputs-2025-12-15","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=27> class=other","connection":"keep-alive","content-length":"4051","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"c98d5241-32d1-48de-9bfa-2e1aada0f39d","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":null,"output_config":{"effort":"medium","format":{"type":"json_schema","schema":{"type":"object","properties":{"title":{"type":"string"}},"required":["title"],"additionalProperties":false}}},"context_management":null,"metadata":{"user_id":"<string len=150>"},"toolsCount":0,"messagesCount":1,"firstUserTextHead":"<session>\nReply with the single word OK.\n</session>\n\nWrite the title in the predominant language of the session — a stray word or code token in another language","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.10a; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":null,"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":null,"len":3059,"matchesBillingRe":false,"oneLine":false,"text":"<3059 chars, first line: \"You are naming a coding session so the user can pick it out of a long list of se\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:27:14.093Z","label":"authbetas","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,oauth-2025-04-20,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=27> class=other","connection":"keep-alive","content-length":"156084","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"c98d5241-32d1-48de-9bfa-2e1aada0f39d","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","thinking","context_management","safeguards","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":{"type":"adaptive","display":"updates"},"output_config":{"effort":"medium"},"context_management":["edits"],"metadata":{"user_id":"<string len=150>"},"toolsCount":15,"messagesCount":2,"firstUserTextHead":"<system-reminder>\nCodebase and user instructions are shown below. Be sure to adhere to these instructions. IMPORTANT: These instructions OVERRIDE any default be","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.b15; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":{"type":"ephemeral"},"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":{"type":"ephemeral"},"len":7555,"matchesBillingRe":false,"oneLine":false,"text":"<7555 chars, first line: \"\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:27:16.076Z","label":"authbetas","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,redact-thinking-2026-02-12,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,oauth-2025-04-20,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,effort-2025-11-24,structured-outputs-2025-12-15","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=27> class=other","connection":"keep-alive","content-length":"4051","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"c98d5241-32d1-48de-9bfa-2e1aada0f39d","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":null,"output_config":{"effort":"medium","format":{"type":"json_schema","schema":{"type":"object","properties":{"title":{"type":"string"}},"required":["title"],"additionalProperties":false}}},"context_management":null,"metadata":{"user_id":"<string len=150>"},"toolsCount":0,"messagesCount":1,"firstUserTextHead":"<session>\nReply with the single word OK.\n</session>\n\nWrite the title in the predominant language of the session — a stray word or code token in another language","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.10a; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":null,"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":null,"len":3059,"matchesBillingRe":false,"oneLine":false,"text":"<3059 chars, first line: \"You are naming a coding session so the user can pick it out of a long list of se\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:27:16.215Z","label":"authbetas","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,oauth-2025-04-20,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=27> class=other","connection":"keep-alive","content-length":"156084","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"c98d5241-32d1-48de-9bfa-2e1aada0f39d","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","thinking","context_management","safeguards","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":{"type":"adaptive","display":"updates"},"output_config":{"effort":"medium"},"context_management":["edits"],"metadata":{"user_id":"<string len=150>"},"toolsCount":15,"messagesCount":2,"firstUserTextHead":"<system-reminder>\nCodebase and user instructions are shown below. Be sure to adhere to these instructions. IMPORTANT: These instructions OVERRIDE any default be","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.b15; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":{"type":"ephemeral"},"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":{"type":"ephemeral"},"len":7555,"matchesBillingRe":false,"oneLine":false,"text":"<7555 chars, first line: \"\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:27:20.412Z","label":"authbetas","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,oauth-2025-04-20,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=27> class=other","connection":"keep-alive","content-length":"156084","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"c98d5241-32d1-48de-9bfa-2e1aada0f39d","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","thinking","context_management","safeguards","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":{"type":"adaptive","display":"updates"},"output_config":{"effort":"medium"},"context_management":["edits"],"metadata":{"user_id":"<string len=150>"},"toolsCount":15,"messagesCount":2,"firstUserTextHead":"<system-reminder>\nCodebase and user instructions are shown below. Be sure to adhere to these instructions. IMPORTANT: These instructions OVERRIDE any default be","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.b15; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":{"type":"ephemeral"},"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":{"type":"ephemeral"},"len":7555,"matchesBillingRe":false,"oneLine":false,"text":"<7555 chars, first line: \"\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:27:20.641Z","label":"authbetas","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,redact-thinking-2026-02-12,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,oauth-2025-04-20,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,effort-2025-11-24,structured-outputs-2025-12-15","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=27> class=other","connection":"keep-alive","content-length":"4051","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"c98d5241-32d1-48de-9bfa-2e1aada0f39d","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":null,"output_config":{"effort":"medium","format":{"type":"json_schema","schema":{"type":"object","properties":{"title":{"type":"string"}},"required":["title"],"additionalProperties":false}}},"context_management":null,"metadata":{"user_id":"<string len=150>"},"toolsCount":0,"messagesCount":1,"firstUserTextHead":"<session>\nReply with the single word OK.\n</session>\n\nWrite the title in the predominant language of the session — a stray word or code token in another language","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.10a; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":null,"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":null,"len":3059,"matchesBillingRe":false,"oneLine":false,"text":"<3059 chars, first line: \"You are naming a coding session so the user can pick it out of a long list of se\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:27:29.244Z","label":"authbetas","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,redact-thinking-2026-02-12,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,oauth-2025-04-20,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,effort-2025-11-24,structured-outputs-2025-12-15","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=27> class=other","connection":"keep-alive","content-length":"4051","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"c98d5241-32d1-48de-9bfa-2e1aada0f39d","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":null,"output_config":{"effort":"medium","format":{"type":"json_schema","schema":{"type":"object","properties":{"title":{"type":"string"}},"required":["title"],"additionalProperties":false}}},"context_management":null,"metadata":{"user_id":"<string len=150>"},"toolsCount":0,"messagesCount":1,"firstUserTextHead":"<session>\nReply with the single word OK.\n</session>\n\nWrite the title in the predominant language of the session — a stray word or code token in another language","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.10a; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":null,"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":null,"len":3059,"matchesBillingRe":false,"oneLine":false,"text":"<3059 chars, first line: \"You are naming a coding session so the user can pick it out of a long list of se\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:27:29.599Z","label":"authbetas","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,oauth-2025-04-20,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=27> class=other","connection":"keep-alive","content-length":"156084","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"c98d5241-32d1-48de-9bfa-2e1aada0f39d","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","thinking","context_management","safeguards","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":{"type":"adaptive","display":"updates"},"output_config":{"effort":"medium"},"context_management":["edits"],"metadata":{"user_id":"<string len=150>"},"toolsCount":15,"messagesCount":2,"firstUserTextHead":"<system-reminder>\nCodebase and user instructions are shown below. Be sure to adhere to these instructions. IMPORTANT: These instructions OVERRIDE any default be","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.b15; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":{"type":"ephemeral"},"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":{"type":"ephemeral"},"len":7555,"matchesBillingRe":false,"oneLine":false,"text":"<7555 chars, first line: \"\">"}]}},"bearerEqualsKeptLogin":null}
diff --git a/packages/cli/src/test-fixtures/advisor/inbound-authenv.jsonl b/packages/cli/src/test-fixtures/advisor/inbound-authenv.jsonl
new file mode 100644
index 00000000..ddc5f439
--- /dev/null
+++ b/packages/cli/src/test-fixtures/advisor/inbound-authenv.jsonl
@@ -0,0 +1,10 @@
+{"at":"2026-10-20T22:25:27.139Z","label":"authenv","method":"HEAD","path":"/api/hello","query":"","headers":{"accept":"*/*","accept-encoding":"gzip, deflate, br, zstd","connection":"keep-alive","host":"127.0.0.1:47811","user-agent":"Bun/1.4.4"},"body":{"parsed":false},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:25:38.503Z","label":"authenv","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,redact-thinking-2026-02-12,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,effort-2025-11-24,structured-outputs-2025-12-15","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=27> class=other","connection":"keep-alive","content-length":"4051","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"3c0b3f49-a647-4ce2-925a-faf1d54ea2ef","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":null,"output_config":{"effort":"medium","format":{"type":"json_schema","schema":{"type":"object","properties":{"title":{"type":"string"}},"required":["title"],"additionalProperties":false}}},"context_management":null,"metadata":{"user_id":"<string len=150>"},"toolsCount":0,"messagesCount":1,"firstUserTextHead":"<session>\nReply with the single word OK.\n</session>\n\nWrite the title in the predominant language of the session — a stray word or code token in another language","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.10a; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":null,"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":null,"len":3059,"matchesBillingRe":false,"oneLine":false,"text":"<3059 chars, first line: \"You are naming a coding session so the user can pick it out of a long list of se\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:25:38.811Z","label":"authenv","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=27> class=other","connection":"keep-alive","content-length":"158569","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"3c0b3f49-a647-4ce2-925a-faf1d54ea2ef","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","thinking","context_management","safeguards","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":{"type":"adaptive","display":"updates"},"output_config":{"effort":"medium"},"context_management":["edits"],"metadata":{"user_id":"<string len=150>"},"toolsCount":15,"messagesCount":2,"firstUserTextHead":"<system-reminder>\nCodebase and user instructions are shown below. Be sure to adhere to these instructions. IMPORTANT: These instructions OVERRIDE any default be","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.b15; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":{"type":"ephemeral"},"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":{"type":"ephemeral"},"len":7555,"matchesBillingRe":false,"oneLine":false,"text":"<7555 chars, first line: \"\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:25:39.054Z","label":"authenv","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,redact-thinking-2026-02-12,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,effort-2025-11-24,structured-outputs-2025-12-15","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=27> class=other","connection":"keep-alive","content-length":"4051","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"3c0b3f49-a647-4ce2-925a-faf1d54ea2ef","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":null,"output_config":{"effort":"medium","format":{"type":"json_schema","schema":{"type":"object","properties":{"title":{"type":"string"}},"required":["title"],"additionalProperties":false}}},"context_management":null,"metadata":{"user_id":"<string len=150>"},"toolsCount":0,"messagesCount":1,"firstUserTextHead":"<session>\nReply with the single word OK.\n</session>\n\nWrite the title in the predominant language of the session — a stray word or code token in another language","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.10a; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":null,"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":null,"len":3059,"matchesBillingRe":false,"oneLine":false,"text":"<3059 chars, first line: \"You are naming a coding session so the user can pick it out of a long list of se\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:25:39.342Z","label":"authenv","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=27> class=other","connection":"keep-alive","content-length":"158569","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"3c0b3f49-a647-4ce2-925a-faf1d54ea2ef","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","thinking","context_management","safeguards","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":{"type":"adaptive","display":"updates"},"output_config":{"effort":"medium"},"context_management":["edits"],"metadata":{"user_id":"<string len=150>"},"toolsCount":15,"messagesCount":2,"firstUserTextHead":"<system-reminder>\nCodebase and user instructions are shown below. Be sure to adhere to these instructions. IMPORTANT: These instructions OVERRIDE any default be","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.b15; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":{"type":"ephemeral"},"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":{"type":"ephemeral"},"len":7555,"matchesBillingRe":false,"oneLine":false,"text":"<7555 chars, first line: \"\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:25:40.176Z","label":"authenv","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,redact-thinking-2026-02-12,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,effort-2025-11-24,structured-outputs-2025-12-15","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=27> class=other","connection":"keep-alive","content-length":"4051","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"3c0b3f49-a647-4ce2-925a-faf1d54ea2ef","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":null,"output_config":{"effort":"medium","format":{"type":"json_schema","schema":{"type":"object","properties":{"title":{"type":"string"}},"required":["title"],"additionalProperties":false}}},"context_management":null,"metadata":{"user_id":"<string len=150>"},"toolsCount":0,"messagesCount":1,"firstUserTextHead":"<session>\nReply with the single word OK.\n</session>\n\nWrite the title in the predominant language of the session — a stray word or code token in another language","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.10a; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":null,"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":null,"len":3059,"matchesBillingRe":false,"oneLine":false,"text":"<3059 chars, first line: \"You are naming a coding session so the user can pick it out of a long list of se\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:25:40.406Z","label":"authenv","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=27> class=other","connection":"keep-alive","content-length":"158569","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"3c0b3f49-a647-4ce2-925a-faf1d54ea2ef","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","thinking","context_management","safeguards","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":{"type":"adaptive","display":"updates"},"output_config":{"effort":"medium"},"context_management":["edits"],"metadata":{"user_id":"<string len=150>"},"toolsCount":15,"messagesCount":2,"firstUserTextHead":"<system-reminder>\nCodebase and user instructions are shown below. Be sure to adhere to these instructions. IMPORTANT: These instructions OVERRIDE any default be","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.b15; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":{"type":"ephemeral"},"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":{"type":"ephemeral"},"len":7555,"matchesBillingRe":false,"oneLine":false,"text":"<7555 chars, first line: \"\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:25:42.341Z","label":"authenv","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,redact-thinking-2026-02-12,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,effort-2025-11-24,structured-outputs-2025-12-15","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=27> class=other","connection":"keep-alive","content-length":"4051","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"3c0b3f49-a647-4ce2-925a-faf1d54ea2ef","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":null,"output_config":{"effort":"medium","format":{"type":"json_schema","schema":{"type":"object","properties":{"title":{"type":"string"}},"required":["title"],"additionalProperties":false}}},"context_management":null,"metadata":{"user_id":"<string len=150>"},"toolsCount":0,"messagesCount":1,"firstUserTextHead":"<session>\nReply with the single word OK.\n</session>\n\nWrite the title in the predominant language of the session — a stray word or code token in another language","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.10a; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":null,"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":null,"len":3059,"matchesBillingRe":false,"oneLine":false,"text":"<3059 chars, first line: \"You are naming a coding session so the user can pick it out of a long list of se\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:25:42.714Z","label":"authenv","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=27> class=other","connection":"keep-alive","content-length":"158569","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"3c0b3f49-a647-4ce2-925a-faf1d54ea2ef","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","thinking","context_management","safeguards","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":{"type":"adaptive","display":"updates"},"output_config":{"effort":"medium"},"context_management":["edits"],"metadata":{"user_id":"<string len=150>"},"toolsCount":15,"messagesCount":2,"firstUserTextHead":"<system-reminder>\nCodebase and user instructions are shown below. Be sure to adhere to these instructions. IMPORTANT: These instructions OVERRIDE any default be","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.b15; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":{"type":"ephemeral"},"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":{"type":"ephemeral"},"len":7555,"matchesBillingRe":false,"oneLine":false,"text":"<7555 chars, first line: \"\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:25:46.535Z","label":"authenv","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,redact-thinking-2026-02-12,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,effort-2025-11-24,structured-outputs-2025-12-15","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=27> class=other","connection":"keep-alive","content-length":"4051","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"3c0b3f49-a647-4ce2-925a-faf1d54ea2ef","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":null,"output_config":{"effort":"medium","format":{"type":"json_schema","schema":{"type":"object","properties":{"title":{"type":"string"}},"required":["title"],"additionalProperties":false}}},"context_management":null,"metadata":{"user_id":"<string len=150>"},"toolsCount":0,"messagesCount":1,"firstUserTextHead":"<session>\nReply with the single word OK.\n</session>\n\nWrite the title in the predominant language of the session — a stray word or code token in another language","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.10a; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":null,"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":null,"len":3059,"matchesBillingRe":false,"oneLine":false,"text":"<3059 chars, first line: \"You are naming a coding session so the user can pick it out of a long list of se\">"}]}},"bearerEqualsKeptLogin":null}
diff --git a/packages/cli/src/test-fixtures/advisor/inbound-helper.jsonl b/packages/cli/src/test-fixtures/advisor/inbound-helper.jsonl
new file mode 100644
index 00000000..81a9a6cc
--- /dev/null
+++ b/packages/cli/src/test-fixtures/advisor/inbound-helper.jsonl
@@ -0,0 +1,10 @@
+{"at":"2026-10-20T22:26:27.083Z","label":"helper","method":"HEAD","path":"/api/hello","query":"","headers":{"accept":"*/*","accept-encoding":"gzip, deflate, br, zstd","connection":"keep-alive","host":"127.0.0.1:47811","user-agent":"Bun/1.4.4"},"body":{"parsed":false},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:26:30.886Z","label":"helper","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,redact-thinking-2026-02-12,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,effort-2025-11-24,structured-outputs-2025-12-15","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=23> class=other","connection":"keep-alive","content-length":"4051","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-api-key":"<redacted len=23> class=other","x-app":"cli","x-claude-code-session-id":"e9108494-830e-4800-8123-a473899528bc","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":null,"output_config":{"effort":"medium","format":{"type":"json_schema","schema":{"type":"object","properties":{"title":{"type":"string"}},"required":["title"],"additionalProperties":false}}},"context_management":null,"metadata":{"user_id":"<string len=150>"},"toolsCount":0,"messagesCount":1,"firstUserTextHead":"<session>\nReply with the single word OK.\n</session>\n\nWrite the title in the predominant language of the session — a stray word or code token in another language","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.10a; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":null,"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":null,"len":3059,"matchesBillingRe":false,"oneLine":false,"text":"<3059 chars, first line: \"You are naming a coding session so the user can pick it out of a long list of se\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:26:31.196Z","label":"helper","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=23> class=other","connection":"keep-alive","content-length":"157812","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-api-key":"<redacted len=23> class=other","x-app":"cli","x-claude-code-session-id":"e9108494-830e-4800-8123-a473899528bc","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","thinking","context_management","safeguards","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":{"type":"adaptive","display":"updates"},"output_config":{"effort":"medium"},"context_management":["edits"],"metadata":{"user_id":"<string len=150>"},"toolsCount":15,"messagesCount":2,"firstUserTextHead":"<system-reminder>\nCodebase and user instructions are shown below. Be sure to adhere to these instructions. IMPORTANT: These instructions OVERRIDE any default be","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.b15; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":{"type":"ephemeral"},"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":{"type":"ephemeral"},"len":7276,"matchesBillingRe":false,"oneLine":false,"text":"<7276 chars, first line: \"\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:26:31.899Z","label":"helper","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,redact-thinking-2026-02-12,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,effort-2025-11-24,structured-outputs-2025-12-15","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=23> class=other","connection":"keep-alive","content-length":"4051","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-api-key":"<redacted len=23> class=other","x-app":"cli","x-claude-code-session-id":"e9108494-830e-4800-8123-a473899528bc","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":null,"output_config":{"effort":"medium","format":{"type":"json_schema","schema":{"type":"object","properties":{"title":{"type":"string"}},"required":["title"],"additionalProperties":false}}},"context_management":null,"metadata":{"user_id":"<string len=150>"},"toolsCount":0,"messagesCount":1,"firstUserTextHead":"<session>\nReply with the single word OK.\n</session>\n\nWrite the title in the predominant language of the session — a stray word or code token in another language","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.10a; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":null,"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":null,"len":3059,"matchesBillingRe":false,"oneLine":false,"text":"<3059 chars, first line: \"You are naming a coding session so the user can pick it out of a long list of se\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:26:32.205Z","label":"helper","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=23> class=other","connection":"keep-alive","content-length":"157812","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-api-key":"<redacted len=23> class=other","x-app":"cli","x-claude-code-session-id":"e9108494-830e-4800-8123-a473899528bc","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","thinking","context_management","safeguards","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":{"type":"adaptive","display":"updates"},"output_config":{"effort":"medium"},"context_management":["edits"],"metadata":{"user_id":"<string len=150>"},"toolsCount":15,"messagesCount":2,"firstUserTextHead":"<system-reminder>\nCodebase and user instructions are shown below. Be sure to adhere to these instructions. IMPORTANT: These instructions OVERRIDE any default be","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.b15; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":{"type":"ephemeral"},"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":{"type":"ephemeral"},"len":7276,"matchesBillingRe":false,"oneLine":false,"text":"<7276 chars, first line: \"\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:26:32.906Z","label":"helper","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,redact-thinking-2026-02-12,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,effort-2025-11-24,structured-outputs-2025-12-15","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=23> class=other","connection":"keep-alive","content-length":"4051","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-api-key":"<redacted len=23> class=other","x-app":"cli","x-claude-code-session-id":"e9108494-830e-4800-8123-a473899528bc","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":null,"output_config":{"effort":"medium","format":{"type":"json_schema","schema":{"type":"object","properties":{"title":{"type":"string"}},"required":["title"],"additionalProperties":false}}},"context_management":null,"metadata":{"user_id":"<string len=150>"},"toolsCount":0,"messagesCount":1,"firstUserTextHead":"<session>\nReply with the single word OK.\n</session>\n\nWrite the title in the predominant language of the session — a stray word or code token in another language","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.10a; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":null,"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":null,"len":3059,"matchesBillingRe":false,"oneLine":false,"text":"<3059 chars, first line: \"You are naming a coding session so the user can pick it out of a long list of se\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:26:33.211Z","label":"helper","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=23> class=other","connection":"keep-alive","content-length":"157812","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-api-key":"<redacted len=23> class=other","x-app":"cli","x-claude-code-session-id":"e9108494-830e-4800-8123-a473899528bc","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","thinking","context_management","safeguards","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":{"type":"adaptive","display":"updates"},"output_config":{"effort":"medium"},"context_management":["edits"],"metadata":{"user_id":"<string len=150>"},"toolsCount":15,"messagesCount":2,"firstUserTextHead":"<system-reminder>\nCodebase and user instructions are shown below. Be sure to adhere to these instructions. IMPORTANT: These instructions OVERRIDE any default be","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.b15; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":{"type":"ephemeral"},"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":{"type":"ephemeral"},"len":7276,"matchesBillingRe":false,"oneLine":false,"text":"<7276 chars, first line: \"\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:26:35.237Z","label":"helper","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=23> class=other","connection":"keep-alive","content-length":"157812","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-api-key":"<redacted len=23> class=other","x-app":"cli","x-claude-code-session-id":"e9108494-830e-4800-8123-a473899528bc","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","thinking","context_management","safeguards","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":{"type":"adaptive","display":"updates"},"output_config":{"effort":"medium"},"context_management":["edits"],"metadata":{"user_id":"<string len=150>"},"toolsCount":15,"messagesCount":2,"firstUserTextHead":"<system-reminder>\nCodebase and user instructions are shown below. Be sure to adhere to these instructions. IMPORTANT: These instructions OVERRIDE any default be","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.b15; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":{"type":"ephemeral"},"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":{"type":"ephemeral"},"len":7276,"matchesBillingRe":false,"oneLine":false,"text":"<7276 chars, first line: \"\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:26:35.341Z","label":"helper","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,redact-thinking-2026-02-12,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,effort-2025-11-24,structured-outputs-2025-12-15","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=23> class=other","connection":"keep-alive","content-length":"4051","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-api-key":"<redacted len=23> class=other","x-app":"cli","x-claude-code-session-id":"e9108494-830e-4800-8123-a473899528bc","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":null,"output_config":{"effort":"medium","format":{"type":"json_schema","schema":{"type":"object","properties":{"title":{"type":"string"}},"required":["title"],"additionalProperties":false}}},"context_management":null,"metadata":{"user_id":"<string len=150>"},"toolsCount":0,"messagesCount":1,"firstUserTextHead":"<session>\nReply with the single word OK.\n</session>\n\nWrite the title in the predominant language of the session — a stray word or code token in another language","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.10a; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":null,"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":null,"len":3059,"matchesBillingRe":false,"oneLine":false,"text":"<3059 chars, first line: \"You are naming a coding session so the user can pick it out of a long list of se\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:26:40.264Z","label":"helper","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,redact-thinking-2026-02-12,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,effort-2025-11-24,structured-outputs-2025-12-15","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=23> class=other","connection":"keep-alive","content-length":"4051","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-api-key":"<redacted len=23> class=other","x-app":"cli","x-claude-code-session-id":"e9108494-830e-4800-8123-a473899528bc","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":null,"output_config":{"effort":"medium","format":{"type":"json_schema","schema":{"type":"object","properties":{"title":{"type":"string"}},"required":["title"],"additionalProperties":false}}},"context_management":null,"metadata":{"user_id":"<string len=150>"},"toolsCount":0,"messagesCount":1,"firstUserTextHead":"<session>\nReply with the single word OK.\n</session>\n\nWrite the title in the predominant language of the session — a stray word or code token in another language","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.10a; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":null,"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":null,"len":3059,"matchesBillingRe":false,"oneLine":false,"text":"<3059 chars, first line: \"You are naming a coding session so the user can pick it out of a long list of se\">"}]}},"bearerEqualsKeptLogin":null}
diff --git a/packages/cli/src/test-fixtures/advisor/inbound-login.jsonl b/packages/cli/src/test-fixtures/advisor/inbound-login.jsonl
new file mode 100644
index 00000000..a6880d92
--- /dev/null
+++ b/packages/cli/src/test-fixtures/advisor/inbound-login.jsonl
@@ -0,0 +1,8 @@
+{"at":"2026-10-20T22:23:59.575Z","label":"login","method":"HEAD","path":"/api/hello","query":"","headers":{"accept":"*/*","accept-encoding":"gzip, deflate, br, zstd","connection":"keep-alive","host":"127.0.0.1:47811","user-agent":"Bun/1.4.4"},"body":{"parsed":false},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:23:59.823Z","label":"login","upstreamFor":"/api/hello","status":200,"responseHeaders":{}}
+{"at":"2026-10-20T22:24:00.901Z","label":"login","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,redact-thinking-2026-02-12,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=108> class=sk-ant-oat*","connection":"keep-alive","content-length":"313","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"20bd7ac2-2728-4575-9a90-457bd2ff7be6","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","max_tokens","messages","metadata"],"model":"claude-opus-5-5","max_tokens":1,"thinking":null,"output_config":null,"context_management":null,"metadata":{"user_id":"<string len=186>"},"toolsCount":0,"messagesCount":1,"firstUserTextHead":"quota","system":{"kind":"absent"}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:24:01.199Z","label":"login","upstreamFor":"/v1/messages","status":429,"responseHeaders":{"anthropic-organization-id":"<len 36>","request-id":"req_011CgEGjvM3FgmgwoyThptQi","x-should-retry":"true"}}
+{"at":"2026-10-20T22:24:17.626Z","label":"login","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,redact-thinking-2026-02-12,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,effort-2025-11-24,structured-outputs-2025-12-15","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=108> class=sk-ant-oat*","connection":"keep-alive","content-length":"4087","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"20bd7ac2-2728-4575-9a90-457bd2ff7be6","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":null,"output_config":{"effort":"medium","format":{"type":"json_schema","schema":{"type":"object","properties":{"title":{"type":"string"}},"required":["title"],"additionalProperties":false}}},"context_management":null,"metadata":{"user_id":"<string len=186>"},"toolsCount":0,"messagesCount":1,"firstUserTextHead":"<session>\nReply with the single word OK.\n</session>\n\nWrite the title in the predominant language of the session — a stray word or code token in another language","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.10a; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":null,"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":null,"len":3059,"matchesBillingRe":false,"oneLine":false,"text":"<3059 chars, first line: \"You are naming a coding session so the user can pick it out of a long list of se\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:24:17.935Z","label":"login","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31,extended-cache-ttl-2025-04-11","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=108> class=sk-ant-oat*","connection":"keep-alive","content-length":"199402","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"20bd7ac2-2728-4575-9a90-457bd2ff7be6","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","thinking","context_management","safeguards","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":{"type":"adaptive","display":"updates"},"output_config":{"effort":"medium"},"context_management":["edits"],"metadata":{"user_id":"<string len=186>"},"toolsCount":15,"messagesCount":2,"firstUserTextHead":"<system-reminder>\nCodebase and user instructions are shown below. Be sure to adhere to these instructions. IMPORTANT: These instructions OVERRIDE any default be","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.b15; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":{"type":"ephemeral","ttl":"1h"},"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":{"type":"ephemeral","ttl":"1h"},"len":11664,"matchesBillingRe":false,"oneLine":false,"text":"<11664 chars, first line: \"\">"}]}},"bearerEqualsKeptLogin":true}
+{"at":"2026-10-20T22:24:18.672Z","label":"login","upstreamFor":"/v1/messages","status":200,"responseHeaders":{"anthropic-organization-id":"<len 36>","anthropic-ratelimit-unified-5h-reset":"1792547400","anthropic-ratelimit-unified-5h-status":"allowed","anthropic-ratelimit-unified-5h-utilization":"0.4","anthropic-ratelimit-unified-7d-reset":"1792911600","anthropic-ratelimit-unified-7d-status":"allowed","anthropic-ratelimit-unified-7d-utilization":"0.61","anthropic-ratelimit-unified-fallback-percentage":"0.5","anthropic-ratelimit-unified-overage-reset":"1793491200","anthropic-ratelimit-unified-overage-status":"allowed","anthropic-ratelimit-unified-overage-utilization":"0.0","anthropic-ratelimit-unified-representative-claim":"five_hour","anthropic-ratelimit-unified-reset":"1792547400","anthropic-ratelimit-unified-status":"allowed","request-id":"req_011CgEGm9rB3T8hUivkyUXxG"}}
+{"at":"2026-10-20T22:24:25.280Z","label":"login","upstreamFor":"/v1/messages","status":200,"responseHeaders":{"anthropic-organization-id":"<len 36>","anthropic-ratelimit-unified-5h-reset":"1792547400","anthropic-ratelimit-unified-5h-status":"allowed","anthropic-ratelimit-unified-5h-utilization":"0.4","anthropic-ratelimit-unified-7d-reset":"1792911600","anthropic-ratelimit-unified-7d-status":"allowed","anthropic-ratelimit-unified-7d-utilization":"0.61","anthropic-ratelimit-unified-fallback-percentage":"0.5","anthropic-ratelimit-unified-overage-reset":"1793491200","anthropic-ratelimit-unified-overage-status":"allowed","anthropic-ratelimit-unified-overage-utilization":"0.0","anthropic-ratelimit-unified-representative-claim":"five_hour","anthropic-ratelimit-unified-reset":"1792547400","anthropic-ratelimit-unified-status":"allowed","request-id":"req_011CgEGmBJEwH8aEzB4mTxEs"}}
diff --git a/packages/cli/src/test-fixtures/advisor/inbound-oauthenv.jsonl b/packages/cli/src/test-fixtures/advisor/inbound-oauthenv.jsonl
new file mode 100644
index 00000000..8089cca2
--- /dev/null
+++ b/packages/cli/src/test-fixtures/advisor/inbound-oauthenv.jsonl
@@ -0,0 +1,6 @@
+{"at":"2026-10-20T22:26:50.142Z","label":"oauthenv","method":"HEAD","path":"/api/hello","query":"","headers":{"accept":"*/*","accept-encoding":"gzip, deflate, br, zstd","connection":"keep-alive","host":"127.0.0.1:47811","user-agent":"Bun/1.4.4"},"body":{"parsed":false},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:26:50.324Z","label":"oauthenv","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,redact-thinking-2026-02-12,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=28> class=other","connection":"keep-alive","content-length":"315","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"6253ea88-188b-4627-aa3f-5547d726386f","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","max_tokens","messages","metadata"],"model":"claude-sonnet-5-5","max_tokens":1,"thinking":null,"output_config":null,"context_management":null,"metadata":{"user_id":"<string len=186>"},"toolsCount":0,"messagesCount":1,"firstUserTextHead":"quota","system":{"kind":"absent"}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:26:51.893Z","label":"oauthenv","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,redact-thinking-2026-02-12,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,effort-2025-11-24,structured-outputs-2025-12-15","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=28> class=other","connection":"keep-alive","content-length":"4089","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"6253ea88-188b-4627-aa3f-5547d726386f","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","output_config","stream"],"model":"claude-sonnet-5-5","max_tokens":128000,"stream":true,"thinking":null,"output_config":{"effort":"medium","format":{"type":"json_schema","schema":{"type":"object","properties":{"title":{"type":"string"}},"required":["title"],"additionalProperties":false}}},"context_management":null,"metadata":{"user_id":"<string len=186>"},"toolsCount":0,"messagesCount":1,"firstUserTextHead":"<session>\nReply with the single word OK.\n</session>\n\nWrite the title in the predominant language of the session — a stray word or code token in another language","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.10a; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":null,"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":null,"len":3059,"matchesBillingRe":false,"oneLine":false,"text":"<3059 chars, first line: \"You are naming a coding session so the user can pick it out of a long list of se\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:26:52.206Z","label":"oauthenv","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31,extended-cache-ttl-2025-04-11","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=28> class=other","connection":"keep-alive","content-length":"164166","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"6253ea88-188b-4627-aa3f-5547d726386f","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","thinking","context_management","safeguards","output_config","stream"],"model":"claude-sonnet-5-5","max_tokens":128000,"stream":true,"thinking":{"type":"adaptive","display":"updates"},"output_config":{"effort":"medium"},"context_management":["edits"],"metadata":{"user_id":"<string len=186>"},"toolsCount":15,"messagesCount":2,"firstUserTextHead":"<system-reminder>\nCodebase and user instructions are shown below. Be sure to adhere to these instructions. IMPORTANT: These instructions OVERRIDE any default be","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.b15; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":{"type":"ephemeral","ttl":"1h"},"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":{"type":"ephemeral","ttl":"1h"},"len":7555,"matchesBillingRe":false,"oneLine":false,"text":"<7555 chars, first line: \"\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:26:52.463Z","label":"oauthenv","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,redact-thinking-2026-02-12,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,effort-2025-11-24,structured-outputs-2025-12-15","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=28> class=other","connection":"keep-alive","content-length":"4089","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"6253ea88-188b-4627-aa3f-5547d726386f","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","output_config","stream"],"model":"claude-sonnet-5-5","max_tokens":128000,"stream":true,"thinking":null,"output_config":{"effort":"medium","format":{"type":"json_schema","schema":{"type":"object","properties":{"title":{"type":"string"}},"required":["title"],"additionalProperties":false}}},"context_management":null,"metadata":{"user_id":"<string len=186>"},"toolsCount":0,"messagesCount":1,"firstUserTextHead":"<session>\nReply with the single word OK.\n</session>\n\nWrite the title in the predominant language of the session — a stray word or code token in another language","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.10a; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":null,"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":null,"len":3059,"matchesBillingRe":false,"oneLine":false,"text":"<3059 chars, first line: \"You are naming a coding session so the user can pick it out of a long list of se\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:26:52.795Z","label":"oauthenv","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31,extended-cache-ttl-2025-04-11","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=28> class=other","connection":"keep-alive","content-length":"164166","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"6253ea88-188b-4627-aa3f-5547d726386f","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","thinking","context_management","safeguards","output_config","stream"],"model":"claude-sonnet-5-5","max_tokens":128000,"stream":true,"thinking":{"type":"adaptive","display":"updates"},"output_config":{"effort":"medium"},"context_management":["edits"],"metadata":{"user_id":"<string len=186>"},"toolsCount":15,"messagesCount":2,"firstUserTextHead":"<system-reminder>\nCodebase and user instructions are shown below. Be sure to adhere to these instructions. IMPORTANT: These instructions OVERRIDE any default be","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.b15; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":{"type":"ephemeral","ttl":"1h"},"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":{"type":"ephemeral","ttl":"1h"},"len":7555,"matchesBillingRe":false,"oneLine":false,"text":"<7555 chars, first line: \"\">"}]}},"bearerEqualsKeptLogin":null}
diff --git a/packages/cli/src/test-fixtures/advisor/inbound-settingsenv.jsonl b/packages/cli/src/test-fixtures/advisor/inbound-settingsenv.jsonl
new file mode 100644
index 00000000..1fec24b2
--- /dev/null
+++ b/packages/cli/src/test-fixtures/advisor/inbound-settingsenv.jsonl
@@ -0,0 +1,13 @@
+{"at":"2026-10-20T22:25:52.757Z","label":"settingsenv","method":"HEAD","path":"/api/hello","query":"","headers":{"accept":"*/*","accept-encoding":"gzip, deflate, br, zstd","connection":"keep-alive","host":"127.0.0.1:47811","user-agent":"Bun/1.4.4"},"body":{"parsed":false},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:26:07.243Z","label":"settingsenv","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,redact-thinking-2026-02-12,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,effort-2025-11-24,structured-outputs-2025-12-15","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=31> class=other","connection":"keep-alive","content-length":"4051","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"2670ab2f-07ad-4030-a2c3-48a86ac4823d","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":null,"output_config":{"effort":"medium","format":{"type":"json_schema","schema":{"type":"object","properties":{"title":{"type":"string"}},"required":["title"],"additionalProperties":false}}},"context_management":null,"metadata":{"user_id":"<string len=150>"},"toolsCount":0,"messagesCount":1,"firstUserTextHead":"<session>\nReply with the single word OK.\n</session>\n\nWrite the title in the predominant language of the session — a stray word or code token in another language","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.10a; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":null,"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":null,"len":3059,"matchesBillingRe":false,"oneLine":false,"text":"<3059 chars, first line: \"You are naming a coding session so the user can pick it out of a long list of se\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:26:07.550Z","label":"settingsenv","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=31> class=other","connection":"keep-alive","content-length":"158430","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"2670ab2f-07ad-4030-a2c3-48a86ac4823d","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","thinking","context_management","safeguards","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":{"type":"adaptive","display":"updates"},"output_config":{"effort":"medium"},"context_management":["edits"],"metadata":{"user_id":"<string len=150>"},"toolsCount":15,"messagesCount":2,"firstUserTextHead":"<system-reminder>\nCodebase and user instructions are shown below. Be sure to adhere to these instructions. IMPORTANT: These instructions OVERRIDE any default be","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.b15; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":{"type":"ephemeral"},"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":{"type":"ephemeral"},"len":7555,"matchesBillingRe":false,"oneLine":false,"text":"<7555 chars, first line: \"\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:26:07.867Z","label":"settingsenv","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,redact-thinking-2026-02-12,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,effort-2025-11-24,structured-outputs-2025-12-15","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=31> class=other","connection":"keep-alive","content-length":"4051","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"2670ab2f-07ad-4030-a2c3-48a86ac4823d","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":null,"output_config":{"effort":"medium","format":{"type":"json_schema","schema":{"type":"object","properties":{"title":{"type":"string"}},"required":["title"],"additionalProperties":false}}},"context_management":null,"metadata":{"user_id":"<string len=150>"},"toolsCount":0,"messagesCount":1,"firstUserTextHead":"<session>\nReply with the single word OK.\n</session>\n\nWrite the title in the predominant language of the session — a stray word or code token in another language","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.10a; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":null,"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":null,"len":3059,"matchesBillingRe":false,"oneLine":false,"text":"<3059 chars, first line: \"You are naming a coding session so the user can pick it out of a long list of se\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:26:08.089Z","label":"settingsenv","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=31> class=other","connection":"keep-alive","content-length":"158430","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"2670ab2f-07ad-4030-a2c3-48a86ac4823d","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","thinking","context_management","safeguards","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":{"type":"adaptive","display":"updates"},"output_config":{"effort":"medium"},"context_management":["edits"],"metadata":{"user_id":"<string len=150>"},"toolsCount":15,"messagesCount":2,"firstUserTextHead":"<system-reminder>\nCodebase and user instructions are shown below. Be sure to adhere to these instructions. IMPORTANT: These instructions OVERRIDE any default be","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.b15; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":{"type":"ephemeral"},"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":{"type":"ephemeral"},"len":7555,"matchesBillingRe":false,"oneLine":false,"text":"<7555 chars, first line: \"\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:26:09.113Z","label":"settingsenv","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,redact-thinking-2026-02-12,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,effort-2025-11-24,structured-outputs-2025-12-15","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=31> class=other","connection":"keep-alive","content-length":"4051","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"2670ab2f-07ad-4030-a2c3-48a86ac4823d","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":null,"output_config":{"effort":"medium","format":{"type":"json_schema","schema":{"type":"object","properties":{"title":{"type":"string"}},"required":["title"],"additionalProperties":false}}},"context_management":null,"metadata":{"user_id":"<string len=150>"},"toolsCount":0,"messagesCount":1,"firstUserTextHead":"<session>\nReply with the single word OK.\n</session>\n\nWrite the title in the predominant language of the session — a stray word or code token in another language","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.10a; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":null,"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":null,"len":3059,"matchesBillingRe":false,"oneLine":false,"text":"<3059 chars, first line: \"You are naming a coding session so the user can pick it out of a long list of se\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:26:09.221Z","label":"settingsenv","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=31> class=other","connection":"keep-alive","content-length":"158430","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"2670ab2f-07ad-4030-a2c3-48a86ac4823d","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","thinking","context_management","safeguards","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":{"type":"adaptive","display":"updates"},"output_config":{"effort":"medium"},"context_management":["edits"],"metadata":{"user_id":"<string len=150>"},"toolsCount":15,"messagesCount":2,"firstUserTextHead":"<system-reminder>\nCodebase and user instructions are shown below. Be sure to adhere to these instructions. IMPORTANT: These instructions OVERRIDE any default be","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.b15; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":{"type":"ephemeral"},"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":{"type":"ephemeral"},"len":7555,"matchesBillingRe":false,"oneLine":false,"text":"<7555 chars, first line: \"\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:26:11.473Z","label":"settingsenv","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,redact-thinking-2026-02-12,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,effort-2025-11-24,structured-outputs-2025-12-15","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=31> class=other","connection":"keep-alive","content-length":"4051","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"2670ab2f-07ad-4030-a2c3-48a86ac4823d","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":null,"output_config":{"effort":"medium","format":{"type":"json_schema","schema":{"type":"object","properties":{"title":{"type":"string"}},"required":["title"],"additionalProperties":false}}},"context_management":null,"metadata":{"user_id":"<string len=150>"},"toolsCount":0,"messagesCount":1,"firstUserTextHead":"<session>\nReply with the single word OK.\n</session>\n\nWrite the title in the predominant language of the session — a stray word or code token in another language","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.10a; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":null,"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":null,"len":3059,"matchesBillingRe":false,"oneLine":false,"text":"<3059 chars, first line: \"You are naming a coding session so the user can pick it out of a long list of se\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:26:13.160Z","label":"settingsenv","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=31> class=other","connection":"keep-alive","content-length":"158926","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"2670ab2f-07ad-4030-a2c3-48a86ac4823d","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","thinking","context_management","safeguards","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":{"type":"adaptive","display":"updates"},"output_config":{"effort":"medium"},"context_management":["edits"],"metadata":{"user_id":"<string len=150>"},"toolsCount":15,"messagesCount":2,"firstUserTextHead":"<system-reminder>\nCodebase and user instructions are shown below. Be sure to adhere to these instructions. IMPORTANT: These instructions OVERRIDE any default be","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.b15; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":{"type":"ephemeral"},"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":{"type":"ephemeral"},"len":7555,"matchesBillingRe":false,"oneLine":false,"text":"<7555 chars, first line: \"\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:26:13.701Z","label":"settingsenv","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=31> class=other","connection":"keep-alive","content-length":"158926","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"2670ab2f-07ad-4030-a2c3-48a86ac4823d","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","thinking","context_management","safeguards","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":{"type":"adaptive","display":"updates"},"output_config":{"effort":"medium"},"context_management":["edits"],"metadata":{"user_id":"<string len=150>"},"toolsCount":15,"messagesCount":2,"firstUserTextHead":"<system-reminder>\nCodebase and user instructions are shown below. Be sure to adhere to these instructions. IMPORTANT: These instructions OVERRIDE any default be","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.b15; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":{"type":"ephemeral"},"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":{"type":"ephemeral"},"len":7555,"matchesBillingRe":false,"oneLine":false,"text":"<7555 chars, first line: \"\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:26:14.821Z","label":"settingsenv","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=31> class=other","connection":"keep-alive","content-length":"158926","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"2670ab2f-07ad-4030-a2c3-48a86ac4823d","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","thinking","context_management","safeguards","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":{"type":"adaptive","display":"updates"},"output_config":{"effort":"medium"},"context_management":["edits"],"metadata":{"user_id":"<string len=150>"},"toolsCount":15,"messagesCount":2,"firstUserTextHead":"<system-reminder>\nCodebase and user instructions are shown below. Be sure to adhere to these instructions. IMPORTANT: These instructions OVERRIDE any default be","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.b15; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":{"type":"ephemeral"},"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":{"type":"ephemeral"},"len":7555,"matchesBillingRe":false,"oneLine":false,"text":"<7555 chars, first line: \"\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:26:16.012Z","label":"settingsenv","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,redact-thinking-2026-02-12,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,effort-2025-11-24,structured-outputs-2025-12-15","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=31> class=other","connection":"keep-alive","content-length":"4051","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"2670ab2f-07ad-4030-a2c3-48a86ac4823d","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":null,"output_config":{"effort":"medium","format":{"type":"json_schema","schema":{"type":"object","properties":{"title":{"type":"string"}},"required":["title"],"additionalProperties":false}}},"context_management":null,"metadata":{"user_id":"<string len=150>"},"toolsCount":0,"messagesCount":1,"firstUserTextHead":"<session>\nReply with the single word OK.\n</session>\n\nWrite the title in the predominant language of the session — a stray word or code token in another language","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.10a; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":null,"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":null,"len":3059,"matchesBillingRe":false,"oneLine":false,"text":"<3059 chars, first line: \"You are naming a coding session so the user can pick it out of a long list of se\">"}]}},"bearerEqualsKeptLogin":null}
+{"at":"2026-10-20T22:26:17.143Z","label":"settingsenv","method":"POST","path":"/v1/messages","query":"?beta=true","headers":{"accept":"application/json","accept-encoding":"gzip, deflate, br, zstd","anthropic-beta":"claude-code-20250219,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31","anthropic-dangerous-direct-browser-access":"true","anthropic-version":"2023-06-01","authorization":"Bearer <redacted len=31> class=other","connection":"keep-alive","content-length":"158926","content-type":"application/json","host":"127.0.0.1:47811","user-agent":"claude-cli/2.1.305 (external, cli)","x-app":"cli","x-claude-code-session-id":"2670ab2f-07ad-4030-a2c3-48a86ac4823d","x-stainless-arch":"arm64","x-stainless-lang":"js","x-stainless-os":"MacOS","x-stainless-package-version":"0.128.0","x-stainless-retry-count":"0","x-stainless-runtime":"node","x-stainless-runtime-version":"v26.3.0","x-stainless-timeout":"600"},"body":{"parsed":true,"keys":["model","messages","system","tools","metadata","max_tokens","thinking","context_management","safeguards","output_config","stream"],"model":"claude-opus-5-5","max_tokens":128000,"stream":true,"thinking":{"type":"adaptive","display":"updates"},"output_config":{"effort":"medium"},"context_management":["edits"],"metadata":{"user_id":"<string len=150>"},"toolsCount":15,"messagesCount":2,"firstUserTextHead":"<system-reminder>\nCodebase and user instructions are shown below. Be sure to adhere to these instructions. IMPORTANT: These instructions OVERRIDE any default be","system":{"kind":"array","blocks":[{"i":0,"type":"text","cache_control":null,"len":70,"matchesBillingRe":true,"oneLine":true,"text":"x-anthropic-billing-header: cc_version=2.1.305.b15; cc_entrypoint=cli;"},{"i":1,"type":"text","cache_control":{"type":"ephemeral"},"len":57,"matchesBillingRe":false,"oneLine":true,"text":"You are Claude Code, Anthropic's official CLI for Claude."},{"i":2,"type":"text","cache_control":{"type":"ephemeral"},"len":7555,"matchesBillingRe":false,"oneLine":false,"text":"<7555 chars, first line: \"\">"}]}},"bearerEqualsKeptLogin":null}
diff --git a/packages/cli/src/test-fixtures/advisor/replay-results-1792535079405.json b/packages/cli/src/test-fixtures/advisor/replay-results-1792535079405.json
new file mode 100644
index 00000000..f576e42b
--- /dev/null
+++ b/packages/cli/src/test-fixtures/advisor/replay-results-1792535079405.json
@@ -0,0 +1,891 @@
+{
+ "capturedLogin": {
+ "beta": "claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31,extended-cache-ttl-2025-04-11",
+ "version": "2023-06-01",
+ "ua": "claude-cli/2.1.305 (external, cli)",
+ "xApp": "cli",
+ "model": "claude-opus-5-5"
+ },
+ "results": [
+ {
+ "tier": "claude-opus-5-5",
+ "shape": "A0",
+ "sent": {
+ "url": "https://api.anthropic.com/v1/messages",
+ "headerNames": ["authorization", "anthropic-version", "content-type", "anthropic-beta"],
+ "beta": "claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31,extended-cache-ttl-2025-04-11",
+ "systemShape": {
+ "kind": "array",
+ "blocks": [
+ {
+ "i": 0,
+ "type": "text",
+ "cache_control": null,
+ "len": 69,
+ "matchesBillingRe": false,
+ "oneLine": true,
+ "text": "You are an advisor. Answer the user's question in at most five words."
+ }
+ ]
+ },
+ "model": "claude-opus-5-5",
+ "max_tokens": 16
+ },
+ "status": 429,
+ "ms": 299,
+ "responseHeaders": {
+ "anthropic-organization-id": "<len 36>",
+ "request-id": "req_011CgEGmn4mofZvhEGQzrfHV",
+ "x-should-retry": "true"
+ },
+ "errorType": "rate_limit_error",
+ "errorMessage": "Error",
+ "ok": null,
+ "rawIfUnparsed": null
+ },
+ {
+ "tier": "claude-opus-5-5",
+ "shape": "A",
+ "sent": {
+ "url": "https://api.anthropic.com/v1/messages",
+ "headerNames": ["authorization", "anthropic-version", "content-type", "anthropic-beta"],
+ "beta": "claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31,extended-cache-ttl-2025-04-11",
+ "systemShape": {
+ "kind": "array",
+ "blocks": [
+ {
+ "i": 0,
+ "type": "text",
+ "cache_control": null,
+ "len": 57,
+ "matchesBillingRe": false,
+ "oneLine": true,
+ "text": "You are Claude Code, Anthropic's official CLI for Claude."
+ },
+ {
+ "i": 1,
+ "type": "text",
+ "cache_control": null,
+ "len": 69,
+ "matchesBillingRe": false,
+ "oneLine": true,
+ "text": "You are an advisor. Answer the user's question in at most five words."
+ }
+ ]
+ },
+ "model": "claude-opus-5-5",
+ "max_tokens": 16
+ },
+ "status": 200,
+ "ms": 1758,
+ "responseHeaders": {
+ "anthropic-organization-id": "<len 36>",
+ "anthropic-ratelimit-unified-5h-reset": "1792547400",
+ "anthropic-ratelimit-unified-5h-status": "allowed",
+ "anthropic-ratelimit-unified-5h-utilization": "0.4",
+ "anthropic-ratelimit-unified-7d-reset": "1792911600",
+ "anthropic-ratelimit-unified-7d-status": "allowed",
+ "anthropic-ratelimit-unified-7d-utilization": "0.61",
+ "anthropic-ratelimit-unified-fallback-percentage": "0.5",
+ "anthropic-ratelimit-unified-overage-reset": "1793491200",
+ "anthropic-ratelimit-unified-overage-status": "allowed",
+ "anthropic-ratelimit-unified-overage-utilization": "0.0",
+ "anthropic-ratelimit-unified-representative-claim": "five_hour",
+ "anthropic-ratelimit-unified-reset": "1792547400",
+ "anthropic-ratelimit-unified-status": "allowed",
+ "request-id": "req_011CgEGmouuQEXGtf8F71X22"
+ },
+ "errorType": null,
+ "errorMessage": null,
+ "ok": {
+ "stop_reason": "end_turn",
+ "model": "claude-opus-5-5",
+ "text": "Yes.",
+ "usage": {
+ "input_tokens": 73,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0,
+ "cache_creation": {
+ "ephemeral_5m_input_tokens": 0,
+ "ephemeral_1h_input_tokens": 0
+ },
+ "output_tokens": 6,
+ "output_tokens_details": {
+ "thinking_tokens": 0
+ },
+ "service_tier": "standard",
+ "inference_geo": "global",
+ "speed": "standard"
+ }
+ },
+ "rawIfUnparsed": null
+ },
+ {
+ "tier": "claude-opus-5-5",
+ "shape": "B",
+ "sent": {
+ "url": "https://api.anthropic.com/v1/messages",
+ "headerNames": ["authorization", "anthropic-version", "content-type", "anthropic-beta"],
+ "beta": "claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31,extended-cache-ttl-2025-04-11",
+ "systemShape": {
+ "kind": "array",
+ "blocks": [
+ {
+ "i": 0,
+ "type": "text",
+ "cache_control": null,
+ "len": 70,
+ "matchesBillingRe": true,
+ "oneLine": true,
+ "text": "x-anthropic-billing-header: cc_version=2.1.305.b15; cc_entrypoint=cli;"
+ },
+ {
+ "i": 1,
+ "type": "text",
+ "cache_control": null,
+ "len": 57,
+ "matchesBillingRe": false,
+ "oneLine": true,
+ "text": "You are Claude Code, Anthropic's official CLI for Claude."
+ },
+ {
+ "i": 2,
+ "type": "text",
+ "cache_control": null,
+ "len": 69,
+ "matchesBillingRe": false,
+ "oneLine": true,
+ "text": "You are an advisor. Answer the user's question in at most five words."
+ }
+ ]
+ },
+ "model": "claude-opus-5-5",
+ "max_tokens": 16
+ },
+ "status": 200,
+ "ms": 1543,
+ "responseHeaders": {
+ "anthropic-organization-id": "<len 36>",
+ "anthropic-ratelimit-unified-5h-reset": "1792547400",
+ "anthropic-ratelimit-unified-5h-status": "allowed",
+ "anthropic-ratelimit-unified-5h-utilization": "0.4",
+ "anthropic-ratelimit-unified-7d-reset": "1792911600",
+ "anthropic-ratelimit-unified-7d-status": "allowed",
+ "anthropic-ratelimit-unified-7d-utilization": "0.61",
+ "anthropic-ratelimit-unified-fallback-percentage": "0.5",
+ "anthropic-ratelimit-unified-overage-reset": "1793491200",
+ "anthropic-ratelimit-unified-overage-status": "allowed",
+ "anthropic-ratelimit-unified-overage-utilization": "0.0",
+ "anthropic-ratelimit-unified-representative-claim": "five_hour",
+ "anthropic-ratelimit-unified-reset": "1792547400",
+ "anthropic-ratelimit-unified-status": "allowed",
+ "request-id": "req_011CgEGmvp8erKh7WnYk418v"
+ },
+ "errorType": null,
+ "errorMessage": null,
+ "ok": {
+ "stop_reason": "end_turn",
+ "model": "claude-opus-5-5",
+ "text": "Yes.",
+ "usage": {
+ "input_tokens": 73,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0,
+ "cache_creation": {
+ "ephemeral_5m_input_tokens": 0,
+ "ephemeral_1h_input_tokens": 0
+ },
+ "output_tokens": 6,
+ "output_tokens_details": {
+ "thinking_tokens": 0
+ },
+ "service_tier": "standard",
+ "inference_geo": "global",
+ "speed": "standard"
+ }
+ },
+ "rawIfUnparsed": null
+ },
+ {
+ "tier": "claude-sonnet-5-5",
+ "shape": "A0",
+ "sent": {
+ "url": "https://api.anthropic.com/v1/messages",
+ "headerNames": ["authorization", "anthropic-version", "content-type", "anthropic-beta"],
+ "beta": "claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31,extended-cache-ttl-2025-04-11",
+ "systemShape": {
+ "kind": "array",
+ "blocks": [
+ {
+ "i": 0,
+ "type": "text",
+ "cache_control": null,
+ "len": 69,
+ "matchesBillingRe": false,
+ "oneLine": true,
+ "text": "You are an advisor. Answer the user's question in at most five words."
+ }
+ ]
+ },
+ "model": "claude-sonnet-5-5",
+ "max_tokens": 16
+ },
+ "status": 429,
+ "ms": 288,
+ "responseHeaders": {
+ "anthropic-organization-id": "<len 36>",
+ "request-id": "req_011CgEGn3RkVuoMkD9qL3ZUo",
+ "x-should-retry": "true"
+ },
+ "errorType": "rate_limit_error",
+ "errorMessage": "Error",
+ "ok": null,
+ "rawIfUnparsed": null
+ },
+ {
+ "tier": "claude-sonnet-5-5",
+ "shape": "A",
+ "sent": {
+ "url": "https://api.anthropic.com/v1/messages",
+ "headerNames": ["authorization", "anthropic-version", "content-type", "anthropic-beta"],
+ "beta": "claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31,extended-cache-ttl-2025-04-11",
+ "systemShape": {
+ "kind": "array",
+ "blocks": [
+ {
+ "i": 0,
+ "type": "text",
+ "cache_control": null,
+ "len": 57,
+ "matchesBillingRe": false,
+ "oneLine": true,
+ "text": "You are Claude Code, Anthropic's official CLI for Claude."
+ },
+ {
+ "i": 1,
+ "type": "text",
+ "cache_control": null,
+ "len": 69,
+ "matchesBillingRe": false,
+ "oneLine": true,
+ "text": "You are an advisor. Answer the user's question in at most five words."
+ }
+ ]
+ },
+ "model": "claude-sonnet-5-5",
+ "max_tokens": 16
+ },
+ "status": 200,
+ "ms": 1268,
+ "responseHeaders": {
+ "anthropic-organization-id": "<len 36>",
+ "anthropic-ratelimit-unified-5h-reset": "1792547400",
+ "anthropic-ratelimit-unified-5h-status": "allowed",
+ "anthropic-ratelimit-unified-5h-utilization": "0.4",
+ "anthropic-ratelimit-unified-7d-reset": "1792911600",
+ "anthropic-ratelimit-unified-7d-status": "allowed",
+ "anthropic-ratelimit-unified-7d-utilization": "0.61",
+ "anthropic-ratelimit-unified-fallback-percentage": "0.5",
+ "anthropic-ratelimit-unified-overage-reset": "1793491200",
+ "anthropic-ratelimit-unified-overage-status": "allowed",
+ "anthropic-ratelimit-unified-overage-utilization": "0.0",
+ "anthropic-ratelimit-unified-representative-claim": "five_hour",
+ "anthropic-ratelimit-unified-reset": "1792547400",
+ "anthropic-ratelimit-unified-status": "allowed",
+ "request-id": "req_011CgEGn4fuJyvtWVf2c6DKT"
+ },
+ "errorType": null,
+ "errorMessage": null,
+ "ok": {
+ "stop_reason": "end_turn",
+ "model": "claude-sonnet-5-5",
+ "text": "Yes.",
+ "usage": {
+ "input_tokens": 73,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0,
+ "cache_creation": {
+ "ephemeral_5m_input_tokens": 0,
+ "ephemeral_1h_input_tokens": 0
+ },
+ "output_tokens": 6,
+ "output_tokens_details": {
+ "thinking_tokens": 0
+ },
+ "service_tier": "standard",
+ "inference_geo": "global",
+ "speed": "standard"
+ }
+ },
+ "rawIfUnparsed": null
+ },
+ {
+ "tier": "claude-sonnet-5-5",
+ "shape": "B",
+ "sent": {
+ "url": "https://api.anthropic.com/v1/messages",
+ "headerNames": ["authorization", "anthropic-version", "content-type", "anthropic-beta"],
+ "beta": "claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31,extended-cache-ttl-2025-04-11",
+ "systemShape": {
+ "kind": "array",
+ "blocks": [
+ {
+ "i": 0,
+ "type": "text",
+ "cache_control": null,
+ "len": 70,
+ "matchesBillingRe": true,
+ "oneLine": true,
+ "text": "x-anthropic-billing-header: cc_version=2.1.305.b15; cc_entrypoint=cli;"
+ },
+ {
+ "i": 1,
+ "type": "text",
+ "cache_control": null,
+ "len": 57,
+ "matchesBillingRe": false,
+ "oneLine": true,
+ "text": "You are Claude Code, Anthropic's official CLI for Claude."
+ },
+ {
+ "i": 2,
+ "type": "text",
+ "cache_control": null,
+ "len": 69,
+ "matchesBillingRe": false,
+ "oneLine": true,
+ "text": "You are an advisor. Answer the user's question in at most five words."
+ }
+ ]
+ },
+ "model": "claude-sonnet-5-5",
+ "max_tokens": 16
+ },
+ "status": 200,
+ "ms": 1120,
+ "responseHeaders": {
+ "anthropic-organization-id": "<len 36>",
+ "anthropic-ratelimit-unified-5h-reset": "1792547400",
+ "anthropic-ratelimit-unified-5h-status": "allowed",
+ "anthropic-ratelimit-unified-5h-utilization": "0.4",
+ "anthropic-ratelimit-unified-7d-reset": "1792911600",
+ "anthropic-ratelimit-unified-7d-status": "allowed",
+ "anthropic-ratelimit-unified-7d-utilization": "0.61",
+ "anthropic-ratelimit-unified-fallback-percentage": "0.5",
+ "anthropic-ratelimit-unified-overage-reset": "1793491200",
+ "anthropic-ratelimit-unified-overage-status": "allowed",
+ "anthropic-ratelimit-unified-overage-utilization": "0.0",
+ "anthropic-ratelimit-unified-representative-claim": "five_hour",
+ "anthropic-ratelimit-unified-reset": "1792547400",
+ "anthropic-ratelimit-unified-status": "allowed",
+ "request-id": "req_011CgEGnAAotUiYtxCkfra2o"
+ },
+ "errorType": null,
+ "errorMessage": null,
+ "ok": {
+ "stop_reason": "end_turn",
+ "model": "claude-sonnet-5-5",
+ "text": "Yes.",
+ "usage": {
+ "input_tokens": 73,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0,
+ "cache_creation": {
+ "ephemeral_5m_input_tokens": 0,
+ "ephemeral_1h_input_tokens": 0
+ },
+ "output_tokens": 6,
+ "output_tokens_details": {
+ "thinking_tokens": 0
+ },
+ "service_tier": "standard",
+ "inference_geo": "global",
+ "speed": "standard"
+ }
+ },
+ "rawIfUnparsed": null
+ },
+ {
+ "tier": "claude-haiku-5-5",
+ "shape": "A0",
+ "sent": {
+ "url": "https://api.anthropic.com/v1/messages",
+ "headerNames": ["authorization", "anthropic-version", "content-type", "anthropic-beta"],
+ "beta": "claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31,extended-cache-ttl-2025-04-11",
+ "systemShape": {
+ "kind": "array",
+ "blocks": [
+ {
+ "i": 0,
+ "type": "text",
+ "cache_control": null,
+ "len": 69,
+ "matchesBillingRe": false,
+ "oneLine": true,
+ "text": "You are an advisor. Answer the user's question in at most five words."
+ }
+ ]
+ },
+ "model": "claude-haiku-5-5",
+ "max_tokens": 16
+ },
+ "status": 429,
+ "ms": 287,
+ "responseHeaders": {
+ "anthropic-organization-id": "<len 36>",
+ "request-id": "req_011CgEGnEsL6TN5Tbq4Ejjht",
+ "x-should-retry": "true"
+ },
+ "errorType": "rate_limit_error",
+ "errorMessage": "Error",
+ "ok": null,
+ "rawIfUnparsed": null
+ },
+ {
+ "tier": "claude-haiku-5-5",
+ "shape": "A",
+ "sent": {
+ "url": "https://api.anthropic.com/v1/messages",
+ "headerNames": ["authorization", "anthropic-version", "content-type", "anthropic-beta"],
+ "beta": "claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31,extended-cache-ttl-2025-04-11",
+ "systemShape": {
+ "kind": "array",
+ "blocks": [
+ {
+ "i": 0,
+ "type": "text",
+ "cache_control": null,
+ "len": 57,
+ "matchesBillingRe": false,
+ "oneLine": true,
+ "text": "You are Claude Code, Anthropic's official CLI for Claude."
+ },
+ {
+ "i": 1,
+ "type": "text",
+ "cache_control": null,
+ "len": 69,
+ "matchesBillingRe": false,
+ "oneLine": true,
+ "text": "You are an advisor. Answer the user's question in at most five words."
+ }
+ ]
+ },
+ "model": "claude-haiku-5-5",
+ "max_tokens": 16
+ },
+ "status": 200,
+ "ms": 1268,
+ "responseHeaders": {
+ "anthropic-organization-id": "<len 36>",
+ "anthropic-ratelimit-unified-5h-reset": "1792547400",
+ "anthropic-ratelimit-unified-5h-status": "allowed",
+ "anthropic-ratelimit-unified-5h-utilization": "0.4",
+ "anthropic-ratelimit-unified-7d-reset": "1792911600",
+ "anthropic-ratelimit-unified-7d-status": "allowed",
+ "anthropic-ratelimit-unified-7d-utilization": "0.61",
+ "anthropic-ratelimit-unified-fallback-percentage": "0.5",
+ "anthropic-ratelimit-unified-overage-reset": "1793491200",
+ "anthropic-ratelimit-unified-overage-status": "allowed",
+ "anthropic-ratelimit-unified-overage-utilization": "0.0",
+ "anthropic-ratelimit-unified-representative-claim": "five_hour",
+ "anthropic-ratelimit-unified-reset": "1792547400",
+ "anthropic-ratelimit-unified-status": "allowed",
+ "request-id": "req_011CgEGnG5kKhoZz5mKt65am"
+ },
+ "errorType": null,
+ "errorMessage": null,
+ "ok": {
+ "stop_reason": "end_turn",
+ "model": "claude-haiku-5-5",
+ "text": "Yes",
+ "usage": {
+ "input_tokens": 73,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0,
+ "cache_creation": {
+ "ephemeral_5m_input_tokens": 0,
+ "ephemeral_1h_input_tokens": 0
+ },
+ "output_tokens": 5,
+ "output_tokens_details": {
+ "thinking_tokens": 0
+ },
+ "service_tier": "standard",
+ "inference_geo": "global",
+ "speed": "standard"
+ }
+ },
+ "rawIfUnparsed": null
+ },
+ {
+ "tier": "claude-haiku-5-5",
+ "shape": "B",
+ "sent": {
+ "url": "https://api.anthropic.com/v1/messages",
+ "headerNames": ["authorization", "anthropic-version", "content-type", "anthropic-beta"],
+ "beta": "claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31,extended-cache-ttl-2025-04-11",
+ "systemShape": {
+ "kind": "array",
+ "blocks": [
+ {
+ "i": 0,
+ "type": "text",
+ "cache_control": null,
+ "len": 70,
+ "matchesBillingRe": true,
+ "oneLine": true,
+ "text": "x-anthropic-billing-header: cc_version=2.1.305.b15; cc_entrypoint=cli;"
+ },
+ {
+ "i": 1,
+ "type": "text",
+ "cache_control": null,
+ "len": 57,
+ "matchesBillingRe": false,
+ "oneLine": true,
+ "text": "You are Claude Code, Anthropic's official CLI for Claude."
+ },
+ {
+ "i": 2,
+ "type": "text",
+ "cache_control": null,
+ "len": 69,
+ "matchesBillingRe": false,
+ "oneLine": true,
+ "text": "You are an advisor. Answer the user's question in at most five words."
+ }
+ ]
+ },
+ "model": "claude-haiku-5-5",
+ "max_tokens": 16
+ },
+ "status": 200,
+ "ms": 1236,
+ "responseHeaders": {
+ "anthropic-organization-id": "<len 36>",
+ "anthropic-ratelimit-unified-5h-reset": "1792547400",
+ "anthropic-ratelimit-unified-5h-status": "allowed",
+ "anthropic-ratelimit-unified-5h-utilization": "0.4",
+ "anthropic-ratelimit-unified-7d-reset": "1792911600",
+ "anthropic-ratelimit-unified-7d-status": "allowed",
+ "anthropic-ratelimit-unified-7d-utilization": "0.61",
+ "anthropic-ratelimit-unified-fallback-percentage": "0.5",
+ "anthropic-ratelimit-unified-overage-reset": "1793491200",
+ "anthropic-ratelimit-unified-overage-status": "allowed",
+ "anthropic-ratelimit-unified-overage-utilization": "0.0",
+ "anthropic-ratelimit-unified-representative-claim": "five_hour",
+ "anthropic-ratelimit-unified-reset": "1792547400",
+ "anthropic-ratelimit-unified-status": "allowed",
+ "request-id": "req_011CgEGnMYfR4ndmpDhcjfdt"
+ },
+ "errorType": null,
+ "errorMessage": null,
+ "ok": {
+ "stop_reason": "end_turn",
+ "model": "claude-haiku-5-5",
+ "text": "Yes",
+ "usage": {
+ "input_tokens": 73,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0,
+ "cache_creation": {
+ "ephemeral_5m_input_tokens": 0,
+ "ephemeral_1h_input_tokens": 0
+ },
+ "output_tokens": 5,
+ "output_tokens_details": {
+ "thinking_tokens": 0
+ },
+ "service_tier": "standard",
+ "inference_geo": "global",
+ "speed": "standard"
+ }
+ },
+ "rawIfUnparsed": null
+ },
+ {
+ "tier": "claude-fable-5-1",
+ "shape": "A0",
+ "sent": {
+ "url": "https://api.anthropic.com/v1/messages",
+ "headerNames": ["authorization", "anthropic-version", "content-type", "anthropic-beta"],
+ "beta": "claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31,extended-cache-ttl-2025-04-11",
+ "systemShape": {
+ "kind": "array",
+ "blocks": [
+ {
+ "i": 0,
+ "type": "text",
+ "cache_control": null,
+ "len": 69,
+ "matchesBillingRe": false,
+ "oneLine": true,
+ "text": "You are an advisor. Answer the user's question in at most five words."
+ }
+ ]
+ },
+ "model": "claude-fable-5-1",
+ "max_tokens": 16
+ },
+ "status": 429,
+ "ms": 308,
+ "responseHeaders": {
+ "anthropic-organization-id": "<len 36>",
+ "request-id": "req_011CgEGnSrQDkHUXoKtogeX9",
+ "x-should-retry": "true"
+ },
+ "errorType": "rate_limit_error",
+ "errorMessage": "Error",
+ "ok": null,
+ "rawIfUnparsed": null
+ },
+ {
+ "tier": "claude-fable-5-1",
+ "shape": "A",
+ "sent": {
+ "url": "https://api.anthropic.com/v1/messages",
+ "headerNames": ["authorization", "anthropic-version", "content-type", "anthropic-beta"],
+ "beta": "claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31,extended-cache-ttl-2025-04-11",
+ "systemShape": {
+ "kind": "array",
+ "blocks": [
+ {
+ "i": 0,
+ "type": "text",
+ "cache_control": null,
+ "len": 57,
+ "matchesBillingRe": false,
+ "oneLine": true,
+ "text": "You are Claude Code, Anthropic's official CLI for Claude."
+ },
+ {
+ "i": 1,
+ "type": "text",
+ "cache_control": null,
+ "len": 69,
+ "matchesBillingRe": false,
+ "oneLine": true,
+ "text": "You are an advisor. Answer the user's question in at most five words."
+ }
+ ]
+ },
+ "model": "claude-fable-5-1",
+ "max_tokens": 16
+ },
+ "status": 200,
+ "ms": 1583,
+ "responseHeaders": {
+ "anthropic-organization-id": "<len 36>",
+ "anthropic-ratelimit-unified-5h-reset": "1792547400",
+ "anthropic-ratelimit-unified-5h-status": "allowed",
+ "anthropic-ratelimit-unified-5h-utilization": "0.4",
+ "anthropic-ratelimit-unified-7d-reset": "1792911600",
+ "anthropic-ratelimit-unified-7d-status": "allowed",
+ "anthropic-ratelimit-unified-7d-utilization": "0.61",
+ "anthropic-ratelimit-unified-7d_oi-reset": "1792911600",
+ "anthropic-ratelimit-unified-7d_oi-status": "allowed",
+ "anthropic-ratelimit-unified-7d_oi-utilization": "0.0",
+ "anthropic-ratelimit-unified-fallback-percentage": "0.5",
+ "anthropic-ratelimit-unified-overage-reset": "1793491200",
+ "anthropic-ratelimit-unified-overage-status": "allowed",
+ "anthropic-ratelimit-unified-overage-utilization": "0.0",
+ "anthropic-ratelimit-unified-representative-claim": "five_hour",
+ "anthropic-ratelimit-unified-reset": "1792547400",
+ "anthropic-ratelimit-unified-status": "allowed",
+ "request-id": "req_011CgEGnUA2THCQKa3fiEC41"
+ },
+ "errorType": null,
+ "errorMessage": null,
+ "ok": {
+ "stop_reason": "end_turn",
+ "model": "claude-fable-5-1",
+ "text": "Yes.",
+ "usage": {
+ "input_tokens": 73,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0,
+ "cache_creation": {
+ "ephemeral_5m_input_tokens": 0,
+ "ephemeral_1h_input_tokens": 0
+ },
+ "output_tokens": 6,
+ "output_tokens_details": {
+ "thinking_tokens": 0
+ },
+ "service_tier": "standard",
+ "inference_geo": "global",
+ "speed": "standard"
+ }
+ },
+ "rawIfUnparsed": null
+ },
+ {
+ "tier": "claude-fable-5-1",
+ "shape": "B",
+ "sent": {
+ "url": "https://api.anthropic.com/v1/messages",
+ "headerNames": ["authorization", "anthropic-version", "content-type", "anthropic-beta"],
+ "beta": "claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31,extended-cache-ttl-2025-04-11",
+ "systemShape": {
+ "kind": "array",
+ "blocks": [
+ {
+ "i": 0,
+ "type": "text",
+ "cache_control": null,
+ "len": 70,
+ "matchesBillingRe": true,
+ "oneLine": true,
+ "text": "x-anthropic-billing-header: cc_version=2.1.305.b15; cc_entrypoint=cli;"
+ },
+ {
+ "i": 1,
+ "type": "text",
+ "cache_control": null,
+ "len": 57,
+ "matchesBillingRe": false,
+ "oneLine": true,
+ "text": "You are Claude Code, Anthropic's official CLI for Claude."
+ },
+ {
+ "i": 2,
+ "type": "text",
+ "cache_control": null,
+ "len": 69,
+ "matchesBillingRe": false,
+ "oneLine": true,
+ "text": "You are an advisor. Answer the user's question in at most five words."
+ }
+ ]
+ },
+ "model": "claude-fable-5-1",
+ "max_tokens": 16
+ },
+ "status": 200,
+ "ms": 1157,
+ "responseHeaders": {
+ "anthropic-organization-id": "<len 36>",
+ "anthropic-ratelimit-unified-5h-reset": "1792547400",
+ "anthropic-ratelimit-unified-5h-status": "allowed",
+ "anthropic-ratelimit-unified-5h-utilization": "0.4",
+ "anthropic-ratelimit-unified-7d-reset": "1792911600",
+ "anthropic-ratelimit-unified-7d-status": "allowed",
+ "anthropic-ratelimit-unified-7d-utilization": "0.61",
+ "anthropic-ratelimit-unified-7d_oi-reset": "1792911600",
+ "anthropic-ratelimit-unified-7d_oi-status": "allowed",
+ "anthropic-ratelimit-unified-7d_oi-utilization": "0.0",
+ "anthropic-ratelimit-unified-fallback-percentage": "0.5",
+ "anthropic-ratelimit-unified-overage-reset": "1793491200",
+ "anthropic-ratelimit-unified-overage-status": "allowed",
+ "anthropic-ratelimit-unified-overage-utilization": "0.0",
+ "anthropic-ratelimit-unified-representative-claim": "five_hour",
+ "anthropic-ratelimit-unified-reset": "1792547400",
+ "anthropic-ratelimit-unified-status": "allowed",
+ "request-id": "req_011CgEGnasbwmrSrwWp69aQx"
+ },
+ "errorType": null,
+ "errorMessage": null,
+ "ok": {
+ "stop_reason": "end_turn",
+ "model": "claude-fable-5-1",
+ "text": "Yes.",
+ "usage": {
+ "input_tokens": 73,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0,
+ "cache_creation": {
+ "ephemeral_5m_input_tokens": 0,
+ "ephemeral_1h_input_tokens": 0
+ },
+ "output_tokens": 6,
+ "output_tokens_details": {
+ "thinking_tokens": 0
+ },
+ "service_tier": "standard",
+ "inference_geo": "global",
+ "speed": "standard"
+ }
+ },
+ "rawIfUnparsed": null
+ },
+ {
+ "tier": "claude-haiku-5-5",
+ "shape": "A",
+ "dropOauthBeta": true,
+ "sent": {
+ "url": "https://api.anthropic.com/v1/messages",
+ "headerNames": ["authorization", "anthropic-version", "content-type", "anthropic-beta"],
+ "beta": "claude-code-20250219,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31,extended-cache-ttl-2025-04-11",
+ "systemShape": {
+ "kind": "array",
+ "blocks": [
+ {
+ "i": 0,
+ "type": "text",
+ "cache_control": null,
+ "len": 57,
+ "matchesBillingRe": false,
+ "oneLine": true,
+ "text": "You are Claude Code, Anthropic's official CLI for Claude."
+ },
+ {
+ "i": 1,
+ "type": "text",
+ "cache_control": null,
+ "len": 69,
+ "matchesBillingRe": false,
+ "oneLine": true,
+ "text": "You are an advisor. Answer the user's question in at most five words."
+ }
+ ]
+ },
+ "model": "claude-haiku-5-5",
+ "max_tokens": 16
+ },
+ "status": 200,
+ "ms": 1196,
+ "responseHeaders": {
+ "anthropic-organization-id": "<len 36>",
+ "anthropic-ratelimit-unified-5h-reset": "1792547400",
+ "anthropic-ratelimit-unified-5h-status": "allowed",
+ "anthropic-ratelimit-unified-5h-utilization": "0.4",
+ "anthropic-ratelimit-unified-7d-reset": "1792911600",
+ "anthropic-ratelimit-unified-7d-status": "allowed",
+ "anthropic-ratelimit-unified-7d-utilization": "0.61",
+ "anthropic-ratelimit-unified-fallback-percentage": "0.5",
+ "anthropic-ratelimit-unified-overage-reset": "1793491200",
+ "anthropic-ratelimit-unified-overage-status": "allowed",
+ "anthropic-ratelimit-unified-overage-utilization": "0.0",
+ "anthropic-ratelimit-unified-representative-claim": "five_hour",
+ "anthropic-ratelimit-unified-reset": "1792547400",
+ "anthropic-ratelimit-unified-status": "allowed",
+ "request-id": "req_011CgEGnfqG1Ww9Fc2PfrVRU"
+ },
+ "errorType": null,
+ "errorMessage": null,
+ "ok": {
+ "stop_reason": "end_turn",
+ "model": "claude-haiku-5-5",
+ "text": "Yes",
+ "usage": {
+ "input_tokens": 73,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0,
+ "cache_creation": {
+ "ephemeral_5m_input_tokens": 0,
+ "ephemeral_1h_input_tokens": 0
+ },
+ "output_tokens": 5,
+ "output_tokens_details": {
+ "thinking_tokens": 0
+ },
+ "service_tier": "standard",
+ "inference_geo": "global",
+ "speed": "standard"
+ }
+ },
+ "rawIfUnparsed": null
+ }
+ ]
+}
diff --git a/packages/cli/src/test-fixtures/advisor/replay-results-1792535094326.json b/packages/cli/src/test-fixtures/advisor/replay-results-1792535094326.json
new file mode 100644
index 00000000..eabd2f6d
--- /dev/null
+++ b/packages/cli/src/test-fixtures/advisor/replay-results-1792535094326.json
@@ -0,0 +1,160 @@
+{
+ "capturedLogin": {
+ "beta": "claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31,extended-cache-ttl-2025-04-11",
+ "version": "2023-06-01",
+ "ua": "claude-cli/2.1.305 (external, cli)",
+ "xApp": "cli",
+ "model": "claude-opus-5-5"
+ },
+ "results": [
+ {
+ "tier": "claude-haiku-5-5",
+ "shape": "A0",
+ "sent": {
+ "url": "https://api.anthropic.com/v1/messages",
+ "headerNames": ["authorization", "anthropic-version", "content-type", "anthropic-beta"],
+ "beta": "claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31,extended-cache-ttl-2025-04-11",
+ "systemShape": {
+ "kind": "array",
+ "blocks": [
+ {
+ "i": 0,
+ "type": "text",
+ "cache_control": null,
+ "len": 69,
+ "matchesBillingRe": false,
+ "oneLine": true,
+ "text": "You are an advisor. Answer the user's question in at most five words."
+ }
+ ]
+ },
+ "model": "claude-haiku-5-5",
+ "max_tokens": 16
+ },
+ "status": 429,
+ "ms": 294,
+ "responseHeaders": {
+ "anthropic-organization-id": "<len 36>",
+ "request-id": "req_011CgEGoiiuaEiWdGwUG2rT5",
+ "x-should-retry": "true"
+ },
+ "errorType": "rate_limit_error",
+ "errorMessage": "Error",
+ "ok": null,
+ "rawIfUnparsed": null
+ },
+ {
+ "tier": "claude-haiku-5-5",
+ "shape": "A",
+ "sent": {
+ "url": "https://api.anthropic.com/v1/messages",
+ "headerNames": ["authorization", "anthropic-version", "content-type", "anthropic-beta"],
+ "beta": "claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31,extended-cache-ttl-2025-04-11",
+ "systemShape": {
+ "kind": "array",
+ "blocks": [
+ {
+ "i": 0,
+ "type": "text",
+ "cache_control": null,
+ "len": 57,
+ "matchesBillingRe": false,
+ "oneLine": true,
+ "text": "You are Claude Code, Anthropic's official CLI for Claude."
+ },
+ {
+ "i": 1,
+ "type": "text",
+ "cache_control": null,
+ "len": 69,
+ "matchesBillingRe": false,
+ "oneLine": true,
+ "text": "You are an advisor. Answer the user's question in at most five words."
+ }
+ ]
+ },
+ "model": "claude-haiku-5-5",
+ "max_tokens": 16
+ },
+ "status": 200,
+ "ms": 1275,
+ "responseHeaders": {
+ "anthropic-organization-id": "<len 36>",
+ "anthropic-ratelimit-unified-5h-reset": "1792547400",
+ "anthropic-ratelimit-unified-5h-status": "allowed",
+ "anthropic-ratelimit-unified-5h-utilization": "0.4",
+ "anthropic-ratelimit-unified-7d-reset": "1792911600",
+ "anthropic-ratelimit-unified-7d-status": "allowed",
+ "anthropic-ratelimit-unified-7d-utilization": "0.61",
+ "anthropic-ratelimit-unified-fallback-percentage": "0.5",
+ "anthropic-ratelimit-unified-overage-reset": "1793491200",
+ "anthropic-ratelimit-unified-overage-status": "allowed",
+ "anthropic-ratelimit-unified-overage-utilization": "0.0",
+ "anthropic-ratelimit-unified-representative-claim": "five_hour",
+ "anthropic-ratelimit-unified-reset": "1792547400",
+ "anthropic-ratelimit-unified-status": "allowed",
+ "request-id": "req_011CgEGojzZ5e9uzXjswmQJT"
+ },
+ "errorType": null,
+ "errorMessage": null,
+ "ok": {
+ "stop_reason": "end_turn",
+ "model": "claude-haiku-5-5",
+ "text": "Yes.",
+ "usage": {
+ "input_tokens": 73,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0,
+ "cache_creation": {
+ "ephemeral_5m_input_tokens": 0,
+ "ephemeral_1h_input_tokens": 0
+ },
+ "output_tokens": 6,
+ "output_tokens_details": {
+ "thinking_tokens": 0
+ },
+ "service_tier": "standard",
+ "inference_geo": "global",
+ "speed": "standard"
+ }
+ },
+ "rawIfUnparsed": null
+ },
+ {
+ "tier": "claude-haiku-5-5",
+ "shape": "A0",
+ "sent": {
+ "url": "https://api.anthropic.com/v1/messages",
+ "headerNames": ["authorization", "anthropic-version", "content-type", "anthropic-beta"],
+ "beta": "claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,per-turn-control-2026-07-01,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advanced-tool-use-2025-11-20,effort-2025-11-24,dangerous-tool-use-2026-09-03,thinking-display-updates-2026-08-18,afk-mode-2026-01-31,extended-cache-ttl-2025-04-11",
+ "systemShape": {
+ "kind": "array",
+ "blocks": [
+ {
+ "i": 0,
+ "type": "text",
+ "cache_control": null,
+ "len": 69,
+ "matchesBillingRe": false,
+ "oneLine": true,
+ "text": "You are an advisor. Answer the user's question in at most five words."
+ }
+ ]
+ },
+ "model": "claude-haiku-5-5",
+ "max_tokens": 16
+ },
+ "status": 429,
+ "ms": 301,
+ "responseHeaders": {
+ "anthropic-organization-id": "<len 36>",
+ "request-id": "req_011CgEGoqTyPTa4G2eV6Uxwo",
+ "x-should-retry": "true"
+ },
+ "errorType": "rate_limit_error",
+ "errorMessage": "Error",
+ "ok": null,
+ "rawIfUnparsed": null
+ }
+ ]
+}