fix: launch grok prompts interactively#2518
Conversation
…kspace components
…sBoard components
…nonical-handoff # Conflicts: # frontend/src/renderer/components/ProjectSettingsForm.test.tsx # frontend/src/renderer/components/ProjectSettingsForm.tsx # frontend/src/renderer/components/SessionsBoard.tsx # frontend/src/renderer/types/workspace.ts
|
Superseded by a clean branch based on upstream/main; reopening with only the Grok fix commit. |
illegalcall
left a comment
There was a problem hiding this comment.
Reviewed this together with #2521 because both PRs move worker launches back toward interactive TUI behavior. I left one inline edge-case comment.
|
|
||
| if cfg.Prompt != "" { | ||
| cmd = append(cmd, "-p", cfg.Prompt) | ||
| cmd = append(cmd, cfg.Prompt) |
There was a problem hiding this comment.
[P2] Terminate flags before the positional prompt
Once the task is passed positionally, a worker prompt that starts with - can be parsed as another Grok CLI option instead of task text. Several sibling interactive adapters append -- before the prompt and have tests with prompts like -add a health check for this reason. Please append the prompt as --, cfg.Prompt (assuming Grok accepts the standard option terminator) and add a regression test for a leading-dash prompt so user task text cannot become flags.
…or_d14024986e-90/fix-grok-interactive-prompt

Summary
-psingle-turn mode-p/--singleCloses #2516
Tests
cd backend && go test ./internal/adapters/agent/grokcd backend && go test ./internal/adapters/agent/...(fails in unrelatedinternal/adapters/agent/kilocode:TestAuthStatusUnknownWhenKeyOnlyComesFromInteractiveShelltimes out; reproduced withgo test ./internal/adapters/agent/kilocode)Risks
--no-auto-update, permission flags, and restore args; only changes fresh Grok prompt delivery.