Skip to main content

rt runs run-start

rt › runs › run-start

Pipeline: open a run DB and print its runId and runDb

Usage​

bash
rt runs run-start [flags]

Arguments & flags​

Flag / ArgTypeDefaultDescription
--repotextRun-dir key for the repo
--work-typetextfeature | fix | ...
--pipelinetextPipeline name from the manifest
--run-idtextOmit to mint one
--spawned-bytextSurface that spawned this run
--pack-dirstextColon-separated pack checkouts for provenance
--tickettextRecorded under producer work
--mattstack-shatextAppended to pack_commits
--mattstack-dirtytext1 forces pack_dirty
--pack-shatextAppended verbatim to pack_commits

See code: commands/runs-write.ts › runsRunStart

Examples & notes​

run-start is the one write verb that does not read RT_RUN_DB: it creates the run DB and hands you the path. Every other write verb reads that path from the environment, so capture it from the JSON result and export it before calling anything else:

bash
result=$(rt runs run-start --repo acme-dev --work-type feature --pipeline feature)
export RT_RUN_DB=$(echo "$result" | jq -r .runDb)

From here, rt runs stage-start, field, decision, and the rest all read $RT_RUN_DB to find the open run. When it is unset (each agent Bash call is a fresh shell), they fall back to the running run this Claude Code session recorded, else the newest running run whose worktree holds the cwd, and the JSON envelope gains runDbResolved (session or worktree). With no match they exit 2.