Skip to content

CLI: busy loop in events wait --follow --timeout 0, unknown task shown as Pending, and HTML responses treated as data #3600

Closed

Description

@integry

Problem

  1. propr events wait -p a/b --follow --timeout 0 loops without any delay: 1302 requests in 3 seconds against a stub that answers immediately. On a real instance this exhausts the API rate limit in seconds.
  2. propr task get nope exits 0 and prints "Task Details … ID: nope / Status: Pending" (--json: {"taskId":"nope","currentState":"pending","isInProgress":true,…,"history":[]}). propr task inspect nope correctly says "Error: Task not found: nope" and exits 1.
  3. When the configured remote answers with HTML (for example propr remote pointed at the web UI host): propr remote-status prints "Cannot read properties of undefined (reading 'toLowerCase')"; propr task list --json exits 0 and prints the HTML page as a JSON string; propr goal list exits 0 with "No goals found."; propr setting get prints a table of single characters; propr stats cost --csv prints the HTML with exit 0.
  4. propr plan list says "Total: 197 plan(s) … More plans available." but has no --limit, --offset or --page; it shows the raw status pr_created where plan get shows "Merged".
  5. propr repo list has no column for the PR title status setting added with --pr-title-status (only --json shows prTitleStatus), and its "Visual previews" column holds a sentence per row, making the table about 240 columns wide.
  6. propr handoffs list text output: no blank line between entries, no count, raw enum values (agent_exited, released_by_operator_force), no updated time.
  7. propr remote-status says "All systems operational." while its JSON has "indexing":"failed"; propr task get shows "Duration: 339975ms"; propr login x prints "Authentication successful!" without contacting the API.

Expected / acceptance criteria

  • 1: with --follow, consecutive waits are at least one second apart, or --timeout 0 is rejected together with --follow.
  • 2: an unknown task id prints "Task not found: " and exits 1, in text and --json mode.
  • 3: every backend command checks that the response is JSON from a ProPR API; otherwise it prints one line such as "The remote did not return a ProPR API response. Check the URL with propr remote." and exits non-zero. No TypeError text, no HTML on stdout.
  • 4: plan list accepts -l, --limit and --offset like task list, and shows the same status labels as plan get.
  • 5: repo list shows the PR title status (on/off) and a short visual-preview value (e.g. image, off); the long explanation stays in --json/repo detail output.
  • 6: handoffs list prints a count, separates entries, labels states in words and shows the updated time in local time.
  • 7: remote-status reports a degraded component instead of "All systems operational."; durations are human-readable (5m 40s); login verifies the token against the API when a remote is configured and says so when it could not verify.
  • Tests for each point.

Implementation

packages/cli/src/commands/eventCommands.ts (follow()), taskCommands.ts, the shared API client used by the commands (one place to validate the response content type and shape), planCommands, repoCommands, the handoffs command.

Notes

Keep exit codes and JSON shapes of successful calls unchanged. Do not contact a real instance in tests.

Activity

  1. propr-dev commented on Nov 17, 2026

    @propr-dev
    Contributor

    🤖 AI processing has started for this issue using claude agent with claude-opus-5-5 model.

    I'll analyze the problem and work on a solution. This may take a few minutes.

    Processing Details:

    • Agent: claude
    • Model: claude-opus-5-5
    • Branch: 3600/claude-opus-5-5-cli-busy-loop-in-events-w-20261117-0355-ov2
    • Base Branch: 3595-epic-0-9-h9l
    • Worktree: issue-3600-20261117-0355-claude-opus-5-5-ov2

    🔍 Track Task Execution

  2. added a commit that references this issue on Nov 17, 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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions