fix: correct OpenCode CLI args (fixes #11)#12
Merged
longyangxi merged 402 commits intomasterfrom Mar 24, 2026
Merged
Conversation
- install-desktop.sh auto-bumps patch version in both tauri.conf.json and root package.json on each build - next.config.ts reads version from root package.json at build time and injects NEXT_PUBLIC_APP_VERSION / NEXT_PUBLIC_APP_BUILD_TIME - Version badge shown in top-left header, Settings tooltip, and Settings modal footer - build:desktop now uses install-desktop.sh with dynamic productName and legacy app cleanup Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… console Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Bring back worktree module (removed in 9de9578) with key improvement: all git operations use getIsolatedGitEnv() which clears 11 git env vars (GIT_DIR, GIT_WORK_TREE, etc.) to prevent cross-worktree contamination. - Claude backend uses native --worktree flag for isolation - Other backends use .worktrees/ managed worktrees - Successful tasks auto-merge back via squash (mergeOnComplete) - Failed tasks auto-cleanup worktree + branch - Git bootstrap uses -c user.name/email for fresh environments - Stale worktree GC runs on gateway startup Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tern) Add instructionPath, stability, guardType, and capability flags to the AIBackend interface inspired by Overstory's AgentRuntime abstraction. Register 5 new backends (copilot, cursor, pi, sapling, aider enriched) alongside existing claude/codex/gemini. Use version probes for ambiguous binary names and argv pattern matching in process scanner to prevent false-positive detection of unrelated tools. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
worktreePath now takes precedence over repoPath in AgentSession so worktree isolation actually keeps agent work off the main branch. Also adds explicit Ably.capabilityOp[] type to fix TS error in ws-server. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…rease retry threshold Prevent stale worktree paths from causing spawn failures and session clear cascades: validate existence before restore (gateway + orchestrator), fall back gracefully in agent-session. Increase resume fail threshold from 2→3 to reduce false session clears. Use registered agent count (not running count) for worktree isolation decisions. Add rotating file logger (gateway.log, 5MB) for post-mortem debugging. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tart, merge on finalize - Worktree OFF: agents work directly in designated directory on current branch - Worktree ON: create branch when agent starts task, keep alive between tasks (preserves --resume session history), merge all at finalize - Startup: always clean ALL residual agent/* branches and .worktrees/ - Never restore stale worktree state from saved sessions - Delegation and direct-fix paths now create worktrees via prepareWorktree callback - Solo agents still merge immediately on task completion - Fixes: agents' changes not visible on main branch; agents losing context between tasks due to worktree recreation clearing session history Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
require() is not available in ESM modules — causes ReferenceError at runtime when worktree merge runs on task completion. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Same ESM compatibility issue as orchestrator.ts — require() is not available, causing cleanupStaleWorktrees to silently fail on startup. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
mergeWorktree did squash merge but never committed, so agent work was staged then lost when the worktree/branch was cleaned up. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When commitOnMerge is true (default): squash merge + auto-commit. When false: squash merge only, changes left staged for review. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Always squash merge worktree back to main on task completion. When mergeOnComplete=true + commitOnMerge=true: auto-commit. When mergeOnComplete=false: squash merge + git reset to unstage, so changes appear as modified files in git status for review. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
git merge --squash requires a clean working tree, so it fails when multiple agents leave unstaged changes. Instead, copy changed files directly from worktree to workspace — works with any working tree state. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Simplify worktree merge to one mode: squash merge + auto-commit. The no-commit / file-copy approach doesn't handle multi-agent conflicts properly — defer review-before-merge to future UI work. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
run <prompt> --quietargs that don't exist in the CLI-p <prompt> -f json -qmatching the actual OpenCode CLI interfacecmd/root.go):-pfor prompt,-ffor output format,-qfor quiet modeFixes #11
Test plan
opencode -p "hello" -f json -qworks