fix: insert -- separator before positional prompt args in codex/opencode/pi-rust#106
Merged
Conversation
…ode/pi-rust Prompts starting with dashes (e.g. YAML frontmatter '---') were being parsed as unknown CLI options by the downstream arg parsers in codex, opencode, and pi-rust, causing silent launch failures. Inserting -- (end-of-options separator) before the positional prompt argument prevents any parser from treating the prompt text as flags. Adapters affected: codex, opencode, pi-rust (all use positional prompt args). Claude Code and pi are unaffected (both use -p <value> flag syntax). Fixes #91 Co-Authored-By: Charlie Hulcher <charlie@kindo.ai>
Co-Authored-By: Charlie Hulcher <charlie@kindo.ai>
c-h-
added a commit
that referenced
this pull request
Mar 6, 2026
New features: - feat: add --file flag to launch command (#95) Bug fixes: - fix: insert -- separator before positional prompt args (#106) - fix: peek/status timeout on opencode sessions (#100) - fix: use temp file for large prompts instead of CLI args (#101) Performance: - perf: use history.jsonl for Claude Code discover(), batch lsof calls (#96) Co-Authored-By: Charlie Hulcher <charlie@kindo.ai>
Merged
c-h-
added a commit
that referenced
this pull request
Mar 6, 2026
New features: - feat: add --file flag to launch command (#95) Bug fixes: - fix: insert -- separator before positional prompt args (#106) - fix: peek/status timeout on opencode sessions (#100) - fix: use temp file for large prompts instead of CLI args (#101) Performance: - perf: use history.jsonl for Claude Code discover(), batch lsof calls (#96) Co-authored-by: Doink (OpenClaw) <charlie+doink@kindo.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Prompts starting with dashes (e.g. YAML frontmatter
---) were silently crashing launches for adapters that pass the prompt as a positional CLI argument. The downstream arg parsers (codex, opencode, pi-rust) would interpret the leading dashes as unknown CLI options and exit immediately.Fix: insert
--(end-of-options separator) immediately before the positional prompt argument in affected adapters.Adapters fixed: codex, opencode, pi-rust (all use positional prompt args)
Unaffected: claude-code, pi (both use
-p <value>flag syntax, not positional)Replaces #99 (that PR diverged from main and inadvertently removed the
isSessionRunningLightweightoptimization from #100).Fixes #91
Test plan
opencode-launch.test.ts: verifies--appears before prompt when prompt starts with-----separatortoContain, no changes needed)