[FEATURE] Programmatic access to scheduled routine (cloud session) transcripts via API
Status Open
Maintainer reply None cached
Workaround ✓ Mentioned in description ↑
Activity 1 comment · opened Aug 11, 2026
Use case
Retrieve the step-by-step transcript/trace of a scheduled routine run programmatically — for audit records, observability pipelines, and cost attribution — instead of only via the web UI.
Current behaviour
- The routines
/fireAPI returns onlyclaude_code_session_idandclaude_code_session_url— no transcript, logs, or summary in the response body. - The only way to read a cloud routine run's trace is to open the session in the web UI and copy it manually.
- Local interactive sessions write JSONL transcripts under
~/.claude/projects/<slug>/, but cloud/scheduled routine runs have no equivalent accessible artefact — not downloadable, not API-fetchable, not synced. - Hooks don't cover this (local-only; cloud routines don't trigger them), and no OpenTelemetry export is documented for routines.
Desired behaviour
Either:
- A REST endpoint, e.g.
GET /v1/claude_code/sessions/{session_id}/transcript(auth via API key or per-routine token), returning transcript JSONL or a structured trace (tools used, files read, commands run, final summary); or - The
/fireresponse (and routine run records) carrying a fetchabletranscript_url.
Why it matters
- Audit and compliance: organisations running fleets of scheduled routines need a durable record of what each run did, retrievable by systems rather than humans.
- Observability: correlating routine runs with logs/metrics currently requires manual UI archaeology.
- Cost attribution: no way to analyse token/time per routine programmatically.
Workaround we use today
Each routine's prompt calls a custom telemetry MCP tool at session end with run metadata and a pointer to the session URL. It works, but it's self-reported by the model rather than harness-recorded, so it can't serve as an audit-grade transcript.
Related (adjacent, none covering this): #80732 (programmatic usage data), #76103 (routines setting session titles), anthropics/claude-agent-sdk-typescript#14 (SDK session history).
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗