Skip to content

fix(sdk): pass stdin marker to opencode run#98

Merged
aroff merged 1 commit into
mainfrom
fix/opencode-stdin-prompt
Jul 7, 2026
Merged

fix(sdk): pass stdin marker to opencode run#98
aroff merged 1 commit into
mainfrom
fix/opencode-stdin-prompt

Conversation

@aroff

@aroff aroff commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Append - as the final positional argument when spawning opencode run, so the prompt written to stdin is actually consumed
  • Without this marker, opencode run prints help and exits, breaking unattended flows like gscp

Test plan

  • cargo test -p aikit-sdk opencode (11 unit + 5 integration tests pass)
  • Built release binary and verified end-to-end:
    aikit agent run -a opencode -p "Reply with exactly: FIXED" -m "zai-coding-plan/glm-5.1" --yolo --events
    Returns assistant message instead of opencode help text

opencode run requires a `-` positional to read the prompt from stdin;
without it the CLI prints help and exits, breaking unattended agent runs.
@aroff aroff merged commit 53efb4e into main Jul 7, 2026
9 checks passed
@aroff aroff deleted the fix/opencode-stdin-prompt branch July 7, 2026 18: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