Skip to content

Add apify report command for humans and agents #1519

Description

@patrikbraborec

Problem

When a command fails, the CLI prints only a bare link to github.com/apify/apify-cli/issues (src/lib/command-framework/help.ts, CommandError.ts, src/commands/cli-management/upgrade.ts). There is no way to report a problem from the terminal: agents running the CLI never report anything.

Proposed solution

Mirror MCP report-problem (apify/apify-mcp-server#1683) as apify report, with the same fields:

  • message (positional, required, max 2000 characters), --actor-id, and --actor-run-id.
  • --sentiment: positive | negative | neutral.
  • --category: bug | spec_mismatch | readme_unclear | missing_capability | worked_well.
  • Optionally --expected and --actual.
  • Send a CLI Reported Problem Segment event through src/lib/hooks/telemetry/trackEvent.ts, with fields mapped to snake_case as in buildReportedProblemProperties. Attach CLI version, OS, install method, the failing command, and whether a human or an agent sent it.
  • Identity mirrors MCP: the Apify user ID when logged in, the anonymous telemetry ID otherwise.

Prior art: stripe feedback (--sentiment, --actor human|agent, feedback.go), vercel feedback, and supabase feedback.

Plan

P0

  • Add apify report with message, --actor-id, and --actor-run-id, sending the CLI Reported Problem event. Works non-interactively and supports --json.
  • Point the existing "report this issue" messages to apify report, as MCP nudges agents on failed tool calls.
  • Detect agent vs. human with src/lib/hooks/telemetry/detectEnvironment.ts, with a flag to override.

P1

  • Add --sentiment and --category, using the enum finalized in report-problem: serve it to Claude clients and add sentiment and category apify-mcp-server#1683.
  • Add --expected and --actual.
  • Bring agent detection in detectEnvironment.ts up to date (it also feeds telemetry). It checks 9 env vars today. Missing compared to Stripe and Vercel:
    • Generic conventions: AI_AGENT, AGENT (Goose, Amp, Bun)
    • Codex: CODEX_CI, CODEX_SANDBOX_NETWORK_DISABLED, CODEX_INTERNAL_ORIGINATOR_OVERRIDE
    • Claude: CLAUDE_CODE, CLAUDE_CODE_IS_COWORK (Cowork)
    • Cursor: CURSOR_TRACE_ID, CURSOR_EXTENSION_HOST_ROLE=agent-exec
    • Others: ANTIGRAVITY_AGENT, ANTIGRAVITY_CLI_ALIAS, AUGMENT_AGENT, OPENCODE_CLIENT, HERMES_AGENT, GROK_AGENT, GROK_SESSION_ID, KIRO_SESSION_ID, TERM_PROGRAM=kiro with no TTY, REPL_ID (Replit), COPILOT_MODEL, COPILOT_ALLOW_ALL, COPILOT_GITHUB_TOKEN, /opt/.devin (Devin)

P2

  • Report the agent host as well as the agent (desktop, terminal, IDE, SDK), the way Stripe's DetectAgentHost reads CLAUDE_CODE_ENTRYPOINT and CODEX_INTERNAL_ORIGINATOR_OVERRIDE.

Open questions

  • Send the event when telemetry is disabled? Reporting is an explicit action, unlike usage tracking.
  • If MCP renames the tool to submit-feedback (open question in report-problem: serve it to Claude clients and add sentiment and category apify-mcp-server#1683), rename the command with it?
  • Keep a hand-maintained list, or depend on @vercel/detect-agent as Supabase does? It lacks AGENT, Hermes, Grok, and Kiro, so it would still need a few local additions.
  • Is CURSOR_TRACE_ID also set when a human types in Cursor's integrated terminal? Vercel treats it as an agent signal, which would then count humans as agents.

Agent detection: Stripe useragent.go (DetectAIAgent, DetectAgentHost), Vercel detect-agent.

Related: apify/apify-mcp-server#1683 (MCP counterpart), apify/apify-mcp-server#1050 (original MCP tool), apify/apify-mcp-server#1290 (nudge on client errors).

Activity

  1. patrikbraborec commented on Oct 23, 2026

    @patrikbraborec
    ContributorAuthor

    Based on discussion with @DaveHanns, we should consider different name than issue as it might be confusing with Actor issues.

  2. changed the title [-]Add `apify issue` and `apify feedback` commands for humans and agents[/-] [+]Add `apify report`command for humans and agents[/+] on Oct 30, 2026
  3. changed the title [-]Add `apify report`command for humans and agents[/-] [+]Add `apify report` command for humans and agents[/+] on Oct 30, 2026
  4. changed the title [-]Add `apify report` command for humans and agents[/-] [+]Add `apify report-problem` command for humans and agents[/+] on Oct 30, 2026
  5. changed the title [-]Add `apify report-problem` command for humans and agents[/-] [+]Add `apify report` command for humans and agents[/+] on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    t-buildersIssues owned by the Builders team.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions