Fix #88: wire issue-source resolution into the .agent start-parallel-agents mirror - #92
Closed
laird wants to merge 1 commit into
Closed
Fix #88: wire issue-source resolution into the .agent start-parallel-agents mirror#92laird wants to merge 1 commit into
laird wants to merge 1 commit into
Conversation
…agents mirror PR #87 mirrored issue-source-lib.sh into .agent/scripts/, but its only consumer there still never called it. The Antigravity swarm launcher had no --issue-source/--issue-dir flags, never resolved a backend, and launched every worker without ISSUE_SOURCE/ISSUE_DIR_PATH — so with `--issue-dir` the dispatcher's chosen issue store never reached the workers, which fell back to whatever .autocoder.json said. .agent/scripts/start-parallel-agents.sh: - source issue-source-lib.sh - parse --issue-source / --issue-dir, and document both in the header comment and --help output - call resolve_effective_issue_source once in the dispatcher - add send_issue_env_tmux / send_issue_env_cmux and invoke them at all five launch sites (3 tmux, 2 cmux), unconditionally rather than behind the existing `AGENT = claude` coordination guard, since every agent framework reads ISSUE_SOURCE tests/test_agent_mirror_parity.sh: This pair cannot join the byte-identical SHARED list — the two sides legitimately differ (tmux/cmux mechanics, ANTIGRAVITY_* vs CLAUDE_CODE_* env names), so a diff check would fail permanently and be ignored. Added behavioural assertions instead: both sides must document both flags in real --help output, and both must parse them, resolve the backend, and emit issue_env_exports. Verification: - Mutation check: reverting only the mirror turns the new guard red (26 passed / 7 failed); with the fix, 33 passed / 0 failed. - Full shell suite: 18/18 pass. - bash -n over all scripts + py_compile: clean. - pytest not installed locally; CI runs it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Jul 29, 2026
Open
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.
Closes #88
Stacked on #87.
.agent/scripts/issue-source-lib.shdoes not exist onmaster— it arrives via #87 — so this branch is cut frommerge/issue-71-masterand based on it. Merge #87 first; this PR's diff then shows only the new work.Root cause
#87 mirrored
issue-source-lib.shinto.agent/scripts/, but its only consumer on that side still never called it..agent/scripts/start-parallel-agents.shhad zero references to the library: no--issue-source/--issue-dirflags, noresolve_effective_issue_source, noissue_env_exports.Consequences, stated precisely (this is not an unconditional break like #71):
issue-config.sh, which resolves.autocoder.jsonper worktree — so the common case lands on the right backend by accident of shared config, not by propagation. But--issue-dirnames a directory that exists nowhere in config, so the dispatcher's choice never reached the workers..agent/workflows/fix.mdbranches on$ISSUE_SOURCE(lines 412, 454), so the value does matter to worker behaviour.Changes
.agent/scripts/start-parallel-agents.shissue-source-lib.sh--issue-source/--issue-dir; document both in the header comment and in--helpresolve_effective_issue_sourceonce in the dispatcher, afterCURRENT_BRANCHsend_issue_env_tmux/send_issue_env_cmux, invoked at all five launch sites (3 tmux, 2 cmux)send_issue_env_cmuxis defined inside the cmux branch because it depends oncmux_send_cmd, which is itself local to that branch — the mirror does not usemux-send-lib.sh'ssend_cmux_commandhere.Both helpers are invoked outside the existing
if [ "$AGENT" = "claude" ]guard that wraps theANTIGRAVITY_*coordination exports. Every agent framework readsISSUE_SOURCE; only the coordination vars are Claude-specific. This matches the plugins copy, which does the same.tests/test_agent_mirror_parity.shThis pair cannot join the byte-identical
SHAREDlist: the two sides legitimately differ (tmux/cmux launch mechanics,ANTIGRAVITY_*vsCLAUDE_CODE_*env names), so a diff check would fail permanently and train everyone to ignore the guard. Behavioural assertions instead, applied symmetrically to both sides:--helpoutput (actually executed — a flag can be documented in a comment and still not be parsed) must mention--issue-sourceand--issue-dirissue-source-lib.sh,--issue-source),--issue-dir),resolve_effective_issue_source, andissue_env_exports— each of the three stages is a separate way to be half-wiredVerification
The new guard is load-bearing. Reverting only
.agent/scripts/start-parallel-agents.shto its pre-fix content and re-running:With the fix restored: 33 passed, 0 failed.
Full shell suite: 18/18 pass.
bash -nover every script andpy_compileover every Python script: clean.--helpruns cleanly on both sides.pytest is not installed in this environment, so the 4 Python tests were not run locally; CI installs pytest and runs them.
🤖 Generated with Claude Code