Get Claude Code session
Automatically get Claude Code session on claude.ai. Full transcript of one Claude Code web session by id, oldest→newest. The transcript is virtualized — only the messages near the viewport exist in the DOM — so this walks it from the top and stops on the count the list itself declares (aria-setsize), rather than guessing when it has seen everything; a read it cannot complete throws instead of returning a partial transcript that would look whole. Each message carries its own id, who sent it (human, assistant, or neither for a system card like "Context cleared"), and the readable text of what the page shows for that turn — prose plus the tool cards' own summaries, in reading order. No timestamp: the page only holds an absolute one in a per-message hover tooltip.
Input
session_id requiredThe session id as returned by list_code_sessions (also the /code/<id> URL segment), e.g. "session_01ESfPiAadbkS23eBAtynZTL".
Output
id requiredtitle requiredThe session's title as shown in the title bar.
messages requiredmessage_count requiredHow many messages the transcript declares (aria-setsize). Always equals messages.length: a read that could not complete throws rather than returning.
FAQ
Ask Claude on claude.ai
Open a new Claude.ai chat, send one question, and wait for the answer to finish (up to 100 s). Returns the answer as the markdown the model emitted, the message and conversation ids, why generation stopped, which model answered, each web search it made with the results it was shown, every source its web_search and web_fetch tools surfaced, and — separately — the sources the answer actually cited. Requires a signed-in session: claude.ai has no anonymous chat, and a signed-out browser fails at once with an error that says so. When the account has used up its 5-hour or weekly allowance, it fails at once with the time the allowance resets, without sending anything. Avoid running many of these at once: claude.ai limits how many chats one account may hold concurrently and refuses the extras, so a refused send comes back quickly carrying Claude's own message and only needs to be retried at a slower pace.
List Claude invoices
List the Claude (claude.ai) plan invoices of the organization currently open in this browser, as its billing settings show them, newest first. To get another organization's invoices, switch to it in claude.ai, then run this again. Each invoice comes with its number, date, total and total before tax (in the currency's smallest unit, so 10800 means 108.00 EUR), currency, status, seats, payment status and a link to its PDF. When the open organization gives you no billing access, the result lists it in skipped with no invoices. complete is false when claude.ai says the organization has older invoices than its billing page shows; those are not returned. The run fails when the browser is not signed in to claude.ai, or when org_uuid is given and a different organization is open. To save a PDF, pass its link to the Stripe invoice PDF download script.
Claude (Anthropic) login
Log into Claude (Anthropic) via Google SSO. Drives Claude's Continue-with-Google popup, picks the account (optional email arg), clears the consent screen, and lands in the Claude app. Runs on your local extension-paired browser only — it relies on the browser's own signed-in Google session, so it won't work on a cloud/managed browser without one.
