Skip to content

fix(skills): pass interactive flag to runSkillsCli in add command#405

Merged
AntonYeromin merged 1 commit into
mainfrom
fix/skills-add-interactive-flag
Jul 3, 2026
Merged

fix(skills): pass interactive flag to runSkillsCli in add command#405
AntonYeromin merged 1 commit into
mainfrom
fix/skills-add-interactive-flag

Conversation

@AntonYeromin

Copy link
Copy Markdown
Collaborator

Summary

When -y/--yes is supplied, the skills add action computed interactive=false but did not forward it to runSkillsCli, which defaulted to interactive=true. In interactive mode the close handler calls process.stderr.write on the buffered stderr. When the parent process has a piped stderr (e.g. integration test spawnSync), this raises EPIPE — an uncaught write error that causes Node to exit with code 1 instead of propagating the real upstream exit code.

Changes

  • Pass interactive to runSkillsCli in skills add so non-interactive runs (-y) use piped stdio and avoid the EPIPE
  • Explicitly forward result.stderr to process.stderr in non-interactive failure paths so egress-blocked and other markers remain visible to the caller

Testing

  • Integration test classifies CODEMIE_SKILL_EGRESS_BLOCKED stderr as egress_blocked exit code now passes (was expected 1 to be 7)
  • Existing test propagates non-zero exit code from upstream spawn continues to pass

Checklist

  • Code follows project standards
  • No merge conflicts with main

When -y/--yes is supplied the action computed interactive=false but did not
forward it to runSkillsCli, which defaulted to interactive=true.  In
interactive mode the close handler calls process.stderr.write on the
buffered stderr, which raises EPIPE when the parent process has a piped
stderr (e.g. integration test spawnSync).  The uncaught write error caused
Node to exit with code 1 instead of propagating the real upstream exit code.

Fix: pass interactive to runSkillsCli so non-interactive runs use piped
stdio and avoid the write.  Also forward result.stderr explicitly in
non-interactive failure paths so egress-blocked and other markers are still
visible to the caller's stderr stream.

Generated with AI

Co-Authored-By: codemie-ai <codemie.ai@gmail.com>
@AntonYeromin AntonYeromin merged commit 7fb3fb2 into main Jul 3, 2026
2 checks passed
@AntonYeromin AntonYeromin deleted the fix/skills-add-interactive-flag branch July 3, 2026 12:25
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.

1 participant