Skip to content

fix: programa race hands OpenCode its prompt with --prompt - #474

Merged
arzafran merged 3 commits into
mainfrom
fix/race-opencode-prompt
Oct 22, 2026
Merged

arzafran merged 3 commits into
mainfrom
fix/race-opencode-prompt

Conversation

@arzafran

@arzafran arzafran commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

What this does

programa race --agent opencode now actually gives OpenCode the prompt. OpenCode reads a bare argument as a project path, so until now it opened with an empty prompt (or failed to find a directory) and the race never started on the task.

Summary

  • raceAgentLaunchCommand adds --prompt before the quoted prompt for opencode. Claude Code and Codex still take it as a positional argument.

  • programa worktree create --from-issue --agent ... had its own copy of the same rule; it now calls raceAgentLaunchCommand, so both paths start agents the same way.

  • tests/test_cli_race_agent_launch.py checks what gets typed into the pane for each agent, including a prompt with an apostrophe.

  • The --from-issue test from feat: create a worktree workspace from a GitHub issue #472 checked workspace_id in --json output, but --json prints refs by default and drops that field, so main has been red on it since feat: create a worktree workspace from a GitHub issue #472. It now checks workspace_ref.

Commits follow the regression-test policy: the first adds only the test and should fail CI, the second adds the fix.

Fixes INC-265

Test Plan

  • On the first commit, the CLI test job fails in test_cli_race_agent_launch.py on the opencode case.
  • On the second commit, CI is green.
  • programa race --agent opencode "say hi" starts OpenCode with "say hi" already in its prompt.

@arzafran
arzafran merged commit 9e1e407 into main Oct 22, 2026
12 checks passed
@arzafran
arzafran deleted the fix/race-opencode-prompt branch October 22, 2026 12:08
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