Skip to content

feat: add --client flag to list interceptions command#21951

Closed
pawbana wants to merge 3 commits intopb/aibridge-user-agent-recordingfrom
pb/aibridge-user-agent-cli-flag
Closed

feat: add --client flag to list interceptions command#21951
pawbana wants to merge 3 commits intopb/aibridge-user-agent-recordingfrom
pb/aibridge-user-agent-cli-flag

Conversation

@pawbana
Copy link
Contributor

@pawbana pawbana commented Feb 5, 2026

No description provided.

Copy link
Contributor Author

pawbana commented Feb 5, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions bot added the stale This issue is like stale bread. label Feb 13, 2026
@pawbana pawbana force-pushed the pb/aibridge-user-agent-recording branch from 524db0c to 7c672c5 Compare February 16, 2026 15:58
@pawbana pawbana force-pushed the pb/aibridge-user-agent-cli-flag branch 2 times, most recently from 301135c to ea4184e Compare February 16, 2026 16:04
@pawbana pawbana force-pushed the pb/aibridge-user-agent-recording branch from 7c672c5 to 63f0a27 Compare February 16, 2026 16:04
@pawbana pawbana force-pushed the pb/aibridge-user-agent-cli-flag branch from ea4184e to 9a23b1c Compare February 16, 2026 16:33
@pawbana pawbana force-pushed the pb/aibridge-user-agent-recording branch from 63f0a27 to 3d8e453 Compare February 16, 2026 16:33
@github-actions github-actions bot removed the stale This issue is like stale bread. label Feb 17, 2026
@pawbana pawbana requested a review from dannykopping February 17, 2026 10:00
@pawbana pawbana force-pushed the pb/aibridge-user-agent-cli-flag branch from 9a23b1c to fe9202a Compare February 17, 2026 10:03
@pawbana pawbana force-pushed the pb/aibridge-user-agent-recording branch from 3d8e453 to 670801f Compare February 17, 2026 10:03
Copy link
Contributor

@dannykopping dannykopping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with minor notes

},
Handler: func(inv *serpent.Invocation) error {
client, err := r.InitClient(inv)
serpetClient, err := r.InitClient(inv)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit

Suggested change
serpetClient, err := r.InitClient(inv)
apiClient, err := r.InitClient(inv)

Flag: "client",
Description: `Only return interceptions from this client.`,
Default: "",
Value: serpent.StringOf(&client),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably support multiple clients, but that can be implemented in a follow-up.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created #22136

<summary>Possible <code>client</code> values</summary>

> [!NOTE]
> AI tools are not setting user agent reliably. Client classification is done on best effort basis.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> AI tools are not setting user agent reliably. Client classification is done on best effort basis.
> Client classification is done on best effort basis using the `User-Agent` header; not all clients send these headers in an easily-identifiable manner.

Comment on lines +35 to +43
- `Claude Code`
- `Codex`
- `Zed`
- `GitHub Copilot (VS Code)`
- `GitHub Copilot (CLI)`
- `Kilo Code`
- `Roo Code`
- `Cursor`
- `Unknown`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little worried about this list going stale.

@pawbana pawbana marked this pull request as ready for review February 17, 2026 13:43
@coder-tasks
Copy link
Contributor

coder-tasks bot commented Feb 17, 2026

Documentation Check

Updates Needed

  • docs/reference/api/aibridge.md - Add client to the available query keys in the description on line 19
    • Current: Available keys are: initiator, provider, model, started_after, started_before.
    • Should be: Available keys are: initiator, provider, model, client, started_after, started_before.

Note

The monitoring.md documentation comprehensively documents the client filter with possible values and usage notes. The CLI reference documentation is auto-generated and will update automatically. Only the API reference needs a manual update to list client as an available query key.


Automated review via Coder Tasks

@pawbana
Copy link
Contributor Author

pawbana commented Feb 17, 2026

Merged in: #21839

@pawbana pawbana closed this Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants