Repository navigation
Description
Context
#1137 (claude-cloud driver) launches phases through the routines/sessions API, because claude --cloud cannot create a session headlessly (see the #1137 spec comment). Four facts that the driver's design depends on are unmeasured. Owner decision, 2026-09-24: no #1137 exec until these are measured, and if P-1 fails #1137 is parked (no LLM-mediated launcher). This issue turns that gate into a graph edge instead of prose.
Known already: GET /v1/environment_providers lists environments (names + env_… ids) under the claude.ai browser session with an x-organization-uuid header. /v1/code/environments returns 404. The target environment is "Sequant Driver", env_01GHgDSBdiWR6evstrUbX2xh (SEQUANT_CHECKOUT=in-place, SEQUANT_ORCHESTRATOR=sequant-run).
Probes
- P-1 (auth): can a plain Node process (no browser, no Claude Code session) authenticate to the
/v1/code/*and/v1/environment_providersendpoints with the long-lived token fromclaude setup-token? - P-2 (model): does the trigger's session request accept a model?
- P-3 (usage): do the raw
GET /v1/code/sessions/{id}/eventsevents carry the SDKresultwithusage/modelUsage, as opposed to the condensedget_run_logtext? - P-4 (stop): which call stops a live session (candidates from the CLI bundle:
/v1/sessions/{id}/archive, aninterruptcontrol request), and does the stopped run leave a readable log?
Script: scripts/probes/claude-cloud-probe.ts, one subcommand per probe, printing JSON. Sessions use a trivial prompt ("Reply with the single word OK and stop.") on "Sequant Driver". Cost cap: $1 total.
Acceptance criteria
- AC-1: P-1 is recorded on feat(drivers): claude-cloud AgentDriver — run a phase as a claude.ai cloud session instead of a nested local CLI #1137: the HTTP status and verbatim error body (token redacted) of
GET /v1/environment_providersandGET /v1/code/triggerscalled from Node with theclaude setup-tokentoken as bearer — Evidence:npx tsx scripts/probes/claude-cloud-probe.ts authJSON output pasted on feat(drivers): claude-cloud AgentDriver — run a phase as a claude.ai cloud session instead of a nested local CLI #1137 - AC-2: owner go/no-go on P-1 is recorded on feat(drivers): claude-cloud AgentDriver — run a phase as a claude.ai cloud session instead of a nested local CLI #1137: pass unblocks feat(drivers): claude-cloud AgentDriver — run a phase as a claude.ai cloud session instead of a nested local CLI #1137, fail parks it — Evidence: human decision comment on feat(drivers): claude-cloud AgentDriver — run a phase as a claude.ai cloud session instead of a nested local CLI #1137 quoting the AC-1 result
- AC-3: if P-1 passes, P-2 is recorded: a one-shot trigger on
env_01GHgDSBdiWR6evstrUbX2xhwith a model set either runs on that model (theinit: model=line) or is refused, verbatim — Evidence:npx tsx scripts/probes/claude-cloud-probe.ts fire --model sonnetJSON output pasted on feat(drivers): claude-cloud AgentDriver — run a phase as a claude.ai cloud session instead of a nested local CLI #1137 - AC-4: if P-1 passes, P-3 is recorded: the raw events of the AC-3 session are saved, and whether a
resultevent carriesusage/modelUsagetoken counts is stated — Evidence:npx tsx scripts/probes/claude-cloud-probe.ts events <cse_id>output and the saved fixture path - AC-5: if P-1 passes, P-4 is recorded: the stop call that ends a live session is identified and exercised on a second trivial session, and its post-stop log is saved — Evidence:
npx tsx scripts/probes/claude-cloud-probe.ts stop <cse_id>output and the saved fixture path - AC-6: every trigger the probe created is deleted or disabled afterwards — Evidence:
npx tsx scripts/probes/claude-cloud-probe.ts list-triggersshows none created by the probe - AC-7: saved fixtures under
src/lib/workflow/drivers/__fixtures__/claude-cloud/contain no token, org UUID, account id or email — Evidence:grep -rEn 'sk-ant-|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[a-z]{2,}' src/lib/workflow/drivers/__fixtures__/claude-cloud/prints nothing - AC-8: total probe spend is at most $1, and the figure (or "unmeasured") is posted on feat(drivers): claude-cloud AgentDriver — run a phase as a claude.ai cloud session instead of a nested local CLI #1137 — Evidence: the claude.ai usage page reading before and after, pasted on feat(drivers): claude-cloud AgentDriver — run a phase as a claude.ai cloud session instead of a nested local CLI #1137
Non-Goals
- Any driver code (that is feat(drivers): claude-cloud AgentDriver — run a phase as a claude.ai cloud session instead of a nested local CLI #1137).
- Committing the token anywhere. It stays in the environment of the shell that runs the probe.
- Reading the Claude Code keychain OAuth token.
- An LLM-mediated launcher if P-1 fails.
Human steps
- Run
claude setup-tokeninteractively and export the token in the probe shell only. - AC-2's go/no-go decision.
Activity
admarble commentedon Sep 25, 2026
AC-1 (P-1) is done: fail (
oauth_scope_insufficient); results are posted on #1137. AC-2: per the owner's standing decision, #1137 is parked. AC-3 to AC-5 are conditional on P-1 and were not run. AC-6 and AC-7 are N/A: no triggers were created and no fixtures saved. AC-8: $0 spent (two read-only GETs).chore(#1151): claude-cloud Phase-0 probe script (P-1 auth) (#1152)