Skip to content

feat(cli): Ask agents to report CLI friction from error output - #2134

Merged
betegon merged 3 commits into
mainfrom
feat/cli-agent-feedback-hint
Nov 10, 2026
Merged

betegon merged 3 commits into
mainfrom
feat/cli-agent-feedback-hint

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #2133. That PR tells agents in the skill to report friction. This one also asks in the CLI's error output, which is where an agent finds out that a flag, an argument, or the help misled it, often only after several tries.

When detectAgent() finds an agent, every error it sees ends with one more line. That covers command failures (user errors included), arguments that don't parse, and unknown commands:

Error: Failed to list organizations: 404
  Failed
If this took several tries or was hard to figure out, tell the Sentry CLI team why once you're done: sentry cli feedback "<what you tried and what got in the way>"

"Once you're done" is deliberate. We want one report after the agent gets there, along the lines of "it took me 10 tries because X and Y", not a report on every failure. The skill guidance now also lists "took several tries to get a command right" as a reason to send feedback.

The line is left out when:

  • a person is running the CLI, meaning no agent was detected from env vars. This is the same check that help and init use.
  • the app is the sentry-mcp bundle, which has no cli feedback command.
  • telemetry is off, because cli feedback refuses to send then.

One open question: the SDK (sdk.run()) builds the same app under the sentry identity. So when an SDK host runs inside a detected agent, SentryError messages will include the line. If we'd rather keep it out of SDK errors, this needs a flag from the binary entry point.

via @betegon.

--

View Session in Sentry

When a detected AI agent hits an error that is not a user error, the
error text now ends with a line pointing it at sentry cli feedback.
People never see it, and it is left out for user errors, in the
sentry-mcp bundle (which has no cli feedback command), and while
telemetry is off (cli feedback refuses to send then).

Co-Authored-By: bete <[email protected]>
@vercel

vercel Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Nov 10, 2026 9:50am UTC

Request Review

@github-actions github-actions Bot added the risk: medium PR risk score: medium label Nov 10, 2026
sentry-junior Bot and others added 2 commits November 10, 2026 09:48
The hint was limited to errors that look like CLI bugs. Agent friction
mostly shows up as user errors instead: a wrong flag, an unknown command,
or an argument that takes several tries to get right. Show the hint on
every error an agent sees, including argument and unknown-command errors,
and ask what got in the way once the agent is done. The skill guidance
now covers commands that took several tries too.

Co-Authored-By: bete <[email protected]>
@sentry-junior sentry-junior Bot changed the title feat(cli): Ask agents to report CLI bugs with cli feedback feat(cli): Ask agents to report CLI friction from error output Nov 10, 2026
@betegon
betegon merged commit bb046c7 into main Nov 10, 2026
26 of 27 checks passed
@betegon
betegon deleted the feat/cli-agent-feedback-hint branch November 10, 2026 10:10

This branch was previously deployed

1 inactive deployment
Preview — 00bf3928 Deployed Nov 10, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant