Skip to content

bug: OSError [Errno 7] Argument list too long when issue has many comments #45

@ellen-goc

Description

@ellen-goc

Problem

When running askcc on a GitHub issue with many comments (e.g., 15+ comments), the command fails with:

OSError: [Errno 7] Argument list too long

This occurs because the full issue content (including all comments) is passed as a command-line argument, exceeding the OS ARG_MAX limit.

Reproduction

Run askcc on any issue with a large number of comments (15+ observed to trigger the error).

Example: sops#9 — "Research: Roles of efficient teams" — failed with this error after accumulating 15 comments.

Expected Behavior

askcc should handle issues with many comments without hitting OS argument length limits.

Proposed Solutions

  1. --no-comments flag — Allow skipping issue comments entirely when only the issue body is needed.
  2. Comment truncation — Automatically truncate or summarize older comments to stay within ARG_MAX.
  3. Pass content via stdin or temp file — Avoid passing large payloads as CLI arguments altogether.

Environment

  • OS: Linux (ARG_MAX typically ~2MB)
  • Trigger: Issues with 15+ comments

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions