Repository navigation
Add apify report command for humans and agents #1519
Description
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
--expectedand--actual. - Send a
CLI Reported ProblemSegment event throughsrc/lib/hooks/telemetry/trackEvent.ts, with fields mapped to snake_case as inbuildReportedProblemProperties. 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 reportwithmessage,--actor-id, and--actor-run-id, sending theCLI Reported Problemevent. 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
--sentimentand--category, using the enum finalized in report-problem: serve it to Claude clients and add sentiment and category apify-mcp-server#1683. - Add
--expectedand--actual. - Bring agent detection in
detectEnvironment.tsup 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=kirowith no TTY,REPL_ID(Replit),COPILOT_MODEL,COPILOT_ALLOW_ALL,COPILOT_GITHUB_TOKEN,/opt/.devin(Devin)
- Generic conventions:
P2
- Report the agent host as well as the agent (desktop, terminal, IDE, SDK), the way Stripe's
DetectAgentHostreadsCLAUDE_CODE_ENTRYPOINTandCODEX_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-agentas Supabase does? It lacksAGENT, Hermes, Grok, and Kiro, so it would still need a few local additions. - Is
CURSOR_TRACE_IDalso 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
patrikbraborec commentedon Oct 23, 2026
Based on discussion with @DaveHanns, we should consider different name than
issueas it might be confusing with Actor issues.[-]Add `apify issue` and `apify feedback` commands for humans and agents[/-][+]Add `apify report`command for humans and agents[/+][-]Add `apify report`command for humans and agents[/-][+]Add `apify report` command for humans and agents[/+][-]Add `apify report` command for humans and agents[/-][+]Add `apify report-problem` command for humans and agents[/+][-]Add `apify report-problem` command for humans and agents[/-][+]Add `apify report` command for humans and agents[/+]