Skip to content

fix: handle large ACP prompts to avoid E2BIG on Linux#15

Merged
Jiaaqiliu merged 1 commit intoaiming-lab:mainfrom
LouisNguyen1409:fix/acp-large-prompt
Mar 17, 2026
Merged

fix: handle large ACP prompts to avoid E2BIG on Linux#15
Jiaaqiliu merged 1 commit intoaiming-lab:mainfrom
LouisNguyen1409:fix/acp-large-prompt

Conversation

@LouisNguyen1409
Copy link

Summary

  • When pipeline prompts exceed Linux MAX_ARG_STRLEN (128KB), passing them as CLI arguments to acpx fails with Argument
    list too long error
  • This happens at Stage 5 (LITERATURE_SCREEN) and other stages with large payloads
  • Prompts under 100KB: CLI argument (no change)
  • Prompts over 100KB: written to temp file, agent reads the file

Tested on

  • HPC cluster (Linux x86_64, PBS, NVIDIA H200)
  • Claude Code v2.1.74 via acpx
  • Confirmed fix resolves E2BIG for Stage 5 LITERATURE_SCREEN

  When the pipeline prompt exceeds Linux MAX_ARG_STRLEN (128KB), passing
  it as a CLI argument to acpx fails with OSError errno 7 (Argument list
  too long). This commonly happens at Stage 5 (LITERATURE_SCREEN) where
  all collected papers are included in the prompt.

  Fix: prompts over 100KB are written to a temp file in /tmp and the
  agent is asked to read the file instead. Small prompts still use the
  original CLI argument path. Temp files are cleaned up in a finally block.
@Jiaaqiliu Jiaaqiliu merged commit d3adf8f into aiming-lab:main Mar 17, 2026
SDDKKK pushed a commit to SDDKKK/AutoResearchClawEE that referenced this pull request Mar 18, 2026
…rompt

fix: handle large ACP prompts to avoid E2BIG on Linux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants