You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: Prompts starting with '---' parsed as CLI options — silent launch failure #91
Bug: Prompts starting with --- are parsed as CLI options, crashing the launch
Problem
When launching Claude Code via agentctl launch claude-code -p "<prompt>" where the prompt content begins with --- (e.g., YAML frontmatter from a spec file), Claude Code's argument parser interprets --- as an invalid CLI option flag and exits immediately:
error: unknown option '---
The session never starts. agentctl reports success ("Launched session pending-XXXXX") because the process was spawned, but it exits immediately with an arg parse error.
Workaround available in v1.5.2: Use the new --file flag (#95) to avoid passing prompts with YAML frontmatter directly:
# Instead of: agentctl launch claude-code -p "$(cat spec.md)" # crashes if spec.md starts with ---# Use:
agentctl launch claude-code --file spec.md -p "Build the spec"
This avoids the arg parser seeing --- as a CLI option.
Root cause still unfixed: The underlying issue (Claude Code's arg parser treating --- in prompt text as an option flag) remains. A proper fix would need to escape or quote the prompt before passing to the adapter, or use a --prompt-file approach if the adapter supports it.
Activity
c-h- commentedon Mar 5, 2026
Workaround available in v1.5.2: Use the new
--fileflag (#95) to avoid passing prompts with YAML frontmatter directly:This avoids the arg parser seeing
---as a CLI option.Root cause still unfixed: The underlying issue (Claude Code's arg parser treating
---in prompt text as an option flag) remains. A proper fix would need to escape or quote the prompt before passing to the adapter, or use a--prompt-fileapproach if the adapter supports it.Leaving open to track the root cause fix.
fix: handle prompts starting with dashes in adapter launch args
fix: handle prompts starting with dashes in adapter launch args
c-h- commentedon Mar 5, 2026
Fixed in PR #99
fix: handle prompts starting with dashes in adapter launch args
fix: insert -- separator before positional prompt args in codex/openc…
fix: insert -- separator before positional prompt args in codex/openc…