CircleCI-Public / CircleCI-Public/chunk-cli

`chunk task run` prints pipeline ID but provides no way to check run progress from the CLI

Open
#434 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
86
Forks
41
Avg merge
3d 7h
Merged PRs (30d)
56

Description

`chunk task run` prints a run ID and pipeline ID on success, but there is no `chunk task status` or `chunk task watch` command to check whether the triggered pipeline succeeded, failed, or is still running. Users and agents must open the CircleCI web UI or call the REST API directly (`GET /api/v2/pipeline/{id}/workflow`, etc.).

The CLI already has CircleCI authentication for `task run`; the gap is observability after trigger.

## Current behavior

1. `chunk task run --definition --prompt "..."` succeeds and prints:
```
Run triggered:
Pipeline:
```
2. `--json` output includes only `runId` and `pipelineId`.
3. `chunk task` subcommands are limited to `run` and `config`.
4. `internal/circleci/client.go` exposes `TriggerRun` only — no pipeline or workflow status methods.

## Impact

- **Who:** Anyone using `chunk task run`, especially agents that need to wait for completion before continuing.
- **Workaround:** Open CircleCI in a browser or poll the REST API manually with the same token.
- **Cost:** Broken automation loops, context switching, and no single-command "run and wait" workflow.

## Reproduction

```bash
chunk auth set circleci
chunk task config
chunk task run --definition --prompt "hello"
# => Run triggered: ... / Pipeline: ...
# No CLI command exists to check progress afterward
```

## Expected behavior

```bash
chunk task status
# Show pipeline/workflow state, failed job names, and a web URL

chunk task watch
# Poll until workflows complete; exit non-zero on failure or timeout
```

`task run` should also print a CircleCI web URL when available.

## Notes

- Status lookup can be pipeline-ID-based; no git repo or `.chunk/run.json` is required.
- CircleCI API v2 pipeline / workflow / job endpoints are sufficient.
- Workflow name `chunk-task` is a useful display priority but not a hard filter.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in internal/circleci/client.go by reading TriggerRun and trace the existing task run and config subcommands. Use the listed CircleCI pipeline, workflow, and job endpoints to define status and watch behavior, then verify JSON output, web URL display, and non-zero exits for failure or timeout.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
57/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.