AgentKit
DocsKitsCLI ReferenceDesktop App
BetaYou are reading docs for the beta channel (2.13.0-beta.20). Features may change before the next stable release.Switch to stable →

ak watch

ak watch dry-run

Preview GitHub issue matches and generated replies without posting comments or updating watch state.

Use ak watch dry-run to review filters and generated reply text before authorizing GitHub comments.

Usage

ak watch dry-run <owner/repo>

Options

FlagDefaultDescription
--label <labels>[]Match an issue having any listed label.
--author <logins>[]Match an issue from any listed login.
--keyword <terms>[]Match title or body containing any term, case-insensitively.
--agent <kit/skill>engineer/scoutGenerate each candidate response with this skill.
--max-per-hour <count>10Evaluate the current persisted rolling-hour budget using this ceiling.
--kits-dir <path>""Override the kit source used by ak run.

Comma-separated values and repeated uses follow Cobra string-slice behavior. Filter categories combine with AND; values inside one category combine with OR. Use a positive rate ceiling.

What the preview does

ak watch dry-run owner/repo --label needs-response --max-per-hour 5
ak watch dry-run owner/repo --author octocat --keyword crash --json

The command asks gh issue list for at most 100 open issues, loads existing local watch state if present, applies filters, and invokes ak run for every allowed, not-previously-responded issue. It never calls gh issue comment, marks an issue responded, consumes the persisted bucket, or saves watch state.

Dry-run prevents GitHub posting, not all external effects. It reads GitHub, sends issue content to the configured agent/provider, and ak run can create its normal local activity or runtime effects.

The current preview checks the existing rate bucket but does not reserve a slot for each simulated reply. When some budget remains, multiple candidates can all appear under would_post_issues even if a live run would hit the ceiling. Treat rate_limit_remaining as the starting budget, not a simulated final budget.

Output and exit status

Human stdout shows target and first-line response previews; full generated text is also written to stderr in dry-run logs. JSON stdout uses kind=watch.dry_run with repository, match count, would-post IDs, would-skip IDs, and starting rate remainder; it omits generated response bodies.

Per-issue agent and rate errors are logged to stderr but omitted from both ID arrays, and the command can still exit 0.

ExitMeaning
0Polling and final rendering completed; inspect stderr for per-issue failures.
1Home/state loading, GitHub polling, or final rendering failed.
2Repository argument or flags were invalid.