Repository navigation
Description
Summary
sequant run no longer creates PRs after successful QA. Worktrees contain completed, QA-passed work but branches are never pushed and PRs are never opened. This is a regression introduced in v1.15.3.
Root Cause
Two interacting issues:
1. SEQUANT_ORCHESTRATOR env var causes model to skip PR creation
Commit cb799d4 (#305) added orchestration context env vars to every claude -p session in run.ts:
env.SEQUANT_ORCHESTRATOR = "sequant-run";
env.SEQUANT_PHASE = phase;The model sees SEQUANT_ORCHESTRATOR=sequant-run in its environment and infers it should defer PR creation to the orchestrator. The sequant repo's own exec skill (.claude/skills/exec/SKILL.md) has an explicit "Orchestration Context" section (added in 2730515, #40) that instructs:
Behavior when orchestrated: Reduce GitHub comment frequency — Defer progress updates to the orchestrator
This section was never propagated to templates/skills/exec/SKILL.md, so user projects don't have the explicit instructions — but the env var is still set, and the model picks up on it.
2. run.ts never implemented PR creation
run.ts calls rebaseBeforePR() after successful QA (added in #295), but there is no corresponding createPR() step. The function name implies PR creation follows, but it was never implemented. Before 1.15.3, the exec skill handled the entire flow including PR creation. After 1.15.3, the orchestrator took over git state management (rebase) but left a gap — nobody creates the PR.
Evidence
Pre-1.15.3 (Feb 20 run, no SEQUANT_ORCHESTRATOR):
- Exec durations: 276-437 seconds (implementation + PR creation)
- PR feat(#68): add configurable parallel agent mode for cost-conscious users #73 created at 03:22 during exec phase of issue docs: Add pre-release checklist #33
SEQUANT_ORCHESTRATORnot set in env
Post-1.15.3 (Feb 21 run, SEQUANT_ORCHESTRATOR=sequant-run):
- Exec durations: 60-264 seconds (implementation only)
- 7 worktrees with completed work, 0 PRs created
- All issues show
status: "success"in run logs - Branches never pushed to remote
Additional Detail
Bash(git push:*) is not in the exec skill's allowed-tools list (and never was). Pre-1.15.3, Claude used it anyway because bypassPermissions mode was set. Post-1.15.3, the model opts not to push at all rather than being blocked — it defers to the orchestrator.
Affected Versions
- v1.15.3 (introduced)
- All
sequant runinvocations with worktree isolation
Proposed Fix
Option A: Orchestrator owns PR creation (recommended)
Add a PR creation step to run.ts after successful QA + rebase:
git push -u origin <branch>from worktreegh pr create --title "feat(#N): <title>" --body "..."with AC checklist- Record PR URL in run log (
prUrlfield) - Add
--no-prflag for users who want manual control
This is the cleaner approach — the orchestrator already owns worktree creation, phase execution, rebase, and cleanup. PR creation is the missing step in that chain.
Option B: Remove SEQUANT_ORCHESTRATOR from exec phase
Stop setting SEQUANT_ORCHESTRATOR for the exec phase so the model creates PRs like before. Quick fix but regresses the orchestration awareness that #305 intentionally added.
Option C: Both
Implement Option A for the orchestrator path, and also add Bash(git push:*) to the exec skill's allowed-tools so standalone /exec can still create PRs explicitly.
Acceptance Criteria
-
sequant runcreates PRs for all issues that pass QA - PR URL is recorded in the run log JSON (
prUrlfield per issue) -
--no-prflag skips PR creation for manual workflows - Chain mode: single PR for the chain (or one per issue — decide during implementation)
- Standalone
/exec(no orchestrator) still creates PRs -
Bash(git push:*)added to exec skillallowed-toolsin bothskills/andtemplates/skills/ - Run summary prints PR URLs for successful issues
Activity
admarble commentedon Feb 21, 2026
Spec Plan — #322
Acceptance Criteria
sequant runcreates PRs for all issues that pass QAprUrlfield per issue)--no-prflag skips PR creation/execstill creates PRs (not orchestrated)Bash(git push:*)added to exec skillallowed-toolsin bothskills/andtemplates/skills/Implementation Plan
prUrl/prNumbertoIssueResultandIssueLogSchemacreatePR()function — New function inrun.ts: push branch +gh pr create+ return URL--no-pr), record in result/log/state--no-prtobin/cli.tsandRunOptionsBash(git push:*)to both.claude/skills/exec/SKILL.mdandtemplates/skills/exec/SKILL.mdcreatePR(),--no-pr, summary outputKey Decisions
createPR()followsrebaseBeforePR()pattern (sync,spawnSync)Non-Goals
git pushpermissionfix(run): add PR creation after successful QA in sequant run
admarble commentedon Feb 21, 2026
/fullsolve Complete
Issue: #322
Status: READY_FOR_MERGE
PR: #323
Summary
Changes (8 files, +524/-1)
src/commands/run.ts— AddedcreatePR()function, wired intorunIssueWithLogging()after rebase, added--no-prsupportsrc/commands/run.test.ts— 5 new tests forcreatePR()(existing PR, fresh create, push fail, create fail, race condition)src/lib/workflow/types.ts— AddedprNumber/prUrltoIssueResultsrc/lib/workflow/run-log-schema.ts— AddedprNumber/prUrltoIssueLogSchemasrc/lib/workflow/log-writer.ts— AddedsetPRInfo()methodbin/cli.ts— Added--no-prCLI option.claude/skills/exec/SKILL.md+templates/skills/exec/SKILL.md— AddedBash(git push:*)to allowed-toolsIterations
Verdict: READY_FOR_MERGE — All AC met, comprehensive test coverage, clean code review.
fix(run): add PR creation after successful QA in sequant run (#323)
admarble commentedon Feb 21, 2026
Documentation Generated
File:
docs/features/run-pr-creation.mdSections Included:
--no-pr, multiple issuesNext Steps:
Ready to merge!
docs: add feature documentation for run PR creation (#322)
docs: update changelog for #322 feature documentation