Skip to content

fix: handle prompts starting with dashes#99

Closed
c-h- wants to merge 1 commit into
mainfrom
fix/dash-prompt-crash
Closed

fix: handle prompts starting with dashes#99
c-h- wants to merge 1 commit into
mainfrom
fix/dash-prompt-crash

Conversation

@c-h-
Copy link
Copy Markdown
Collaborator

@c-h- c-h- commented Mar 5, 2026

Summary

  • Insert -- (end-of-options separator) before prompt positional arguments in codex, opencode, and pi-rust adapters
  • Prevents prompts starting with --- (e.g. YAML frontmatter from spec files) from being misinterpreted as CLI options by downstream arg parsers
  • Added launch tests for dash-prefixed prompts across all affected adapters

Fixes #91

Test plan

  • New tests verify -- separator is present before prompt in codex, opencode, and pi-rust spawn args
  • Existing launch tests updated to expect -- separator
  • All 450 tests pass
  • TypeScript typecheck clean
  • Pre-push hooks (lint + typecheck + build + test) pass

Insert -- (end-of-options separator) before the prompt positional argument
in codex, opencode, and pi-rust adapters. This prevents prompts starting
with --- (e.g. YAML frontmatter) from being misinterpreted as CLI options
by the downstream arg parser.

Fixes #91

Co-Authored-By: Charlie Hulcher <charlie@kindo.ai>
@c-h- c-h- force-pushed the fix/dash-prompt-crash branch from 269ea67 to 8653477 Compare March 5, 2026 22:52
@c-h-
Copy link
Copy Markdown
Collaborator Author

c-h- commented Mar 6, 2026

Closing this PR — the branch diverged from main during the refactor and inadvertently removes the isSessionRunningLightweight optimization (merged in #100) and large-prompt temp-file support from opencode.ts.

The underlying bug (prompts starting with --- crashing codex/opencode/pi-rust) still exists on main. Opening a fresh, clean PR with only the -- separator fix, without touching anything else.

@c-h- c-h- closed this Mar 6, 2026
auto-merge was automatically disabled March 6, 2026 17:55

Pull request was closed

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.

Bug: Prompts starting with '---' parsed as CLI options — silent launch failure

1 participant