Add --follow flag to depot ci run#522
Merged
Merged
Conversation
Adds --follow/-f to `depot ci run`, which streams the triggered run's logs once it starts, reusing the same streaming path as `ci logs --follow` via a shared followRunLogs helper. The flag is mutually exclusive with --ssh/--ssh-after-step.
121watts
approved these changes
Jun 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before / After
Before — to follow the logs of a run you triggered from the CLI, you had to scrape the
Run:ID out ofdepot ci run's output and feed it intodepot ci logs <id> --followyourself, e.g.:After —
depot ci run ... --follow(or-f) streams the run's logs directly, as soon as the run starts:How
Added
--follow/-ftoci run. The follow streaming flow fromci logs(resolve target → follow-retry → reporter → stream) was extracted into a sharedfollowRunLogshelper in the samecipackage, andci runcalls it withresp.RunIdafter the run is triggered. The flag is mutually exclusive with--ssh/--ssh-after-step(guarded early with a clear error). The existingci logs --followbehavior is unchanged. Build, vet, and tests pass.Testing
go build ./...,go vet ./pkg/cmd/ci/..., andgo test ./pkg/cmd/ci/...all pass.Generated by Claude Code
Note
Low Risk
CLI-only refactor reusing existing log streaming; no auth or API contract changes beyond a new flag and validation.
Overview
depot ci runnow accepts--follow/-fso a triggered workflow can stream live logs in the same terminal without copying the run ID intodepot ci logs … --follow.After the run starts,
ci runcalls shared helpersfollowRunLogs/followRunLogsWithReporterin thecipackage. Those helpers encapsulate resolve log target → follow retry while jobs spin up →streamLogsWithFollowUX.depot ci logs <run-id> --followuses the same path when run status is already loaded, so follow behavior stays aligned.--followcannot be used with--sshor--ssh-after-step. With a single--job, that job is selected for logs; with multiple or all jobs, resolution auto-picks or prompts likeci logs.Reviewed by Cursor Bugbot for commit 2d19f0c. Bugbot is set up for automated code reviews on this repo. Configure here.