Skip to content

docs(cli): Tell agents to report CLI friction with cli feedback - #2133

Merged
betegon merged 1 commit into
mainfrom
docs/cli-agent-feedback-guidance
Nov 10, 2026
Merged

betegon merged 1 commit into
mainfrom
docs/cli-agent-feedback-guidance

Conversation

@sentry-junior

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

Copy link
Copy Markdown
Contributor

The MCP server asks agents to report friction through submit_feedback_to_sentry_team. The CLI already has sentry cli feedback, but the skill only lists it in the command index and never tells agents to use it.

This adds a Key Principle to the agent guidance, which the skill generator copies into SKILL.md. It follows the MCP tool's rules: report when no command could do the task, a command failed or returned wrong data, or output or help was confusing. Send at most once per task, after finishing or giving up. Leave out secrets and personal data. Skip it when telemetry is disabled.

A follow-up PR adds an agent-only hint to CLI error output.

via @betegon.

--

View Session in Sentry

The MCP server asks agents to report friction through
submit_feedback_to_sentry_team, but the CLI skill never pointed agents
at sentry cli feedback. Add an Agent Guidance principle that mirrors the
MCP tool's rules: once per task, after finishing or giving up, and no
secrets or personal data.

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:27am UTC

Request Review

@betegon
betegon merged commit fca9832 into main Nov 10, 2026
33 of 35 checks passed
@betegon
betegon deleted the docs/cli-agent-feedback-guidance branch November 10, 2026 09:47
betegon added a commit that referenced this pull request Nov 10, 2026
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.

<!-- junior-request-attribution:start -->
via @betegon.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:local%3Aweb%3A8bb08551b257239350c3302a -->

--

[View Session in
Sentry](https://sentry.sentry.io/explore/conversations/local%3Aweb%3A8bb08551b257239350c3302a/?project=4510944073809921)

<!-- junior-session-footer:end -->

---------

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: bete <[email protected]>

This branch was previously deployed

1 inactive deployment
Preview — 1e0e9db1 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: low PR risk score: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant