Repository navigation
fix(bin): omit agy --effort for Opus to prevent Gemini fallback - #5
Merged
Merged
Conversation
Omit the incompatible effort flag for claude-opus-4-6-thinking and report the omission while retaining requested task metadata. Preserve existing effort behavior for other models without capability heuristics. Cover launch arguments, omission notices, metadata, and pass-through behavior through the spawn interface. Native automatic model selection remains unverified; the parent observed interactive Opus receipt.
davidtandoh
added a commit
that referenced
this pull request
Sep 27, 2026
Bring fork main (2f9a106, the 2026-09-26 upstream sync plus fork fixes #2-#6) into the Kiro V3 crew branch so PR #8 merges cleanly. A merge, not a rebase, keeps the upstream PR kunchenguid#4679 merge and its authorship intact. Textual conflicts (1): - bin/fm-test-run.sh, family_for_basename live-e2e list: this branch added fm-kiro-signals-live-e2e.test.sh on its own line; main added fm-herdr-agent-liveness-live-e2e.test.sh beside the version-floor test. Kept both entries, so both live tests stay classified in the live-harness-optin family. Auto-merged files touched by both sides, checked by hand: - bin/fm-spawn.sh: main's agy Opus --effort omission (fork fix #5) sits in the agy arm next to this branch's new kiro effort arm; effort_flag_for_harness keeps the (harness, effort, model) signature on both sides. - agy.md, docs/configuration.md, docs/verification/runtime-backends.md: disjoint hunks. Semantic review: the Kiro adapter adds no arm to bin/backends/herdr.sh or fm_harness_pid_alive. Kiro reaches the fork's registration- independent Herdr liveness (fork fix #3) through fm_agent_process_classify_name, where kiro-cli classifies as agent. It is worker-only, so it stays out of the primary session-lock harness table. Claude-Session: https://claude.ai/code/session_01B4Krq5gHjEPXbmzMaaeTHs
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.
Intent
Implement the narrow launch fix and regression tests so requesting Opus cannot silently fall back to Gemini because of an unsupported effort flag.
Approved with: sure. what's up with the kiro herdr integrations as well as quota axi too
Approval context: approval to implement the narrow launch fix and regression tests, commit, validate through no-mistakes, push and open a PR. No merge or installation grant.
What Changed
bin/fm-spawn.sh:effort_flag_for_harnessnow omits--effortfor the agy modelclaude-opus-4-6-thinkingand prints a stderr notice, because native agy rejected that combination and selected Gemini instead. The requested effort still lands in task metadata, and every other model keeps the existinglow|medium|highpass-through andxhigh/maxrecord-and-omit behavior; no capability is inferred from model names.tests/fm-agy-harness.test.sh: adds two regression tests. One spawns Opus at every effort level plus the default and asserts the model is kept,--effortis absent from the launch, metadata retains the model and effort, and the notice appears only when an effort was requested. The other asserts a syntheticfuture-modeland the default selection still pass--effort 'high'through with no omission notice. The fakeagy modelslisting gains both ids.docs/verification/agy.mddescribe the model-scoped effort behavior, record the attributed 2026-09-17 parent-session observation of the fallback and interactive Opus selection, and list what remains unexercised for Opus (automatic native launch after the omission, full lifecycle acceptance, quota routing).Risk Assessment
✅ Low: A narrow exact-model guard at the single shared effort-flag boundary with a stderr notice, preserved metadata, unchanged behavior for every other model, and behavioral regression tests driven through the real spawn interface; no unrequired components or intent contradictions found.
Testing
I ran the real
bin/fm-spawn.shthrough its command line in isolated temporary homes. The test harness supplied fake tmux and agy binaries, so no real pane or model session was started. For Opus with low, medium, high, xhigh, max and default effort, the launch kept--model 'claude-opus-4-6-thinking'and carried no--effort. Every explicit effort printed the notice, and the meta file kept the requested effort. The default-effort case printed no notice. A Gemini model, a syntheticfuture-modeland default model selection still carried--effort. An Opus-named id missing from the listing was still refused before launch. The same drive against the base commit's spawn script showed the bug: Opus launched with--effort 'high'and no notice, and the new test failed there.tests/fm-agy-harness.test.shpassed in full on the target commit. A read-only probe of the installed agy 1.2.5 confirmed thatclaude-opus-4-6-thinkingis a listed model id and that--effortaccepts low, medium or high. A real Opus agy session was not launched. There is no UI surface, so the evidence is command-line transcripts. My temporary copy at/tmp/fm-agy-tkZjGwis still there because the destructive-command guard refused removal outside the worktree. The worktree is clean.--model 'claude-opus-4-6-thinking'only.test_agy_opus_effort_is_recorded_and_disclosed_but_omittedin fm-agy-harness-test.log, plus the Opus/xhigh drive in transcript-fix.log.--model 'claude-opus-4-6-thinking' --effort 'high', and the new test reportsnot ok - Opus launch carried an incompatible effort flag.test_agy_other_model_effort_behavior_is_preserved.error: agy model 'claude-opus-9-not-listed' is not listed by 'agy models', and nothing typed into the pane.agy modelslistsclaude-opus-4-6-thinking, and--helpdocuments--effort (low|medium|high).Evidence: Fixed spawn transcript (target commit)
Source: Fixed spawn transcript (target commit)
=== fm-spawn.sh ... --harness agy --model claude-opus-4-6-thinking --effort high exit=0 --- spawn output (notices): notice: agy model 'claude-opus-4-6-thinking' does not support --effort; recording requested effort 'high' but omitting the flag to avoid model fallback --- agy flags typed into the pane: --model 'claude-opus-4-6-thinking' --- task metadata: model=claude-opus-4-6-thinking effort=high === ... --model gemini-3.8-flash-high --effort high exit=0 --- spawn output (notices): (none) --- agy flags typed into the pane: --model 'gemini-3.8-flash-high' --effort 'high'Evidence: Base commit transcript reproducing the bug
Source: Base commit transcript reproducing the bug
=== fm-spawn.sh ... --harness agy --model claude-opus-4-6-thinking --effort high exit=0 --- spawn output (notices): (none) --- agy flags typed into the pane: --model 'claude-opus-4-6-thinking' --effort 'high' ... not ok - Opus launch carried an incompatible effort flag (unexpected: '--effort')Evidence: Full agy harness test run on target commit
Source: Full agy harness test run on target commit
Evidence: Read-only probe of installed agy 1.2.5 (models listing, --effort help)
Source: Read-only probe of installed agy 1.2.5 (models listing, --effort help)
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
bin/fm-spawn.sh:2023- The omission keys on the exact requested idclaude-opus-4-6-thinking. When no--modelis given (or--model default),--effort low|medium|highstill passes through, so if agy's native default ever resolves to Opus the same reject-and-fall-back sequence is reachable. The intent scopes the fix to requesting Opus and the commit message explicitly records native automatic selection as unverified, so this is an acknowledged boundary rather than a defect. Traced: every spawn/relaunch/secondmate path resolves MODEL before the single call site at bin/fm-spawn.sh:4048, the notice goes to stderr so it does not pollute the captured EFFORTFLAG,ultrais refused earlier for non-pi harnesses, and meta still recordseffort=/model=as requested.✅ **Test** - passed
✅ No issues found.
--model 'claude-opus-4-6-thinking'only.test_agy_opus_effort_is_recorded_and_disclosed_but_omittedin fm-agy-harness-test.log, plus the Opus/xhigh drive in transcript-fix.log.--model 'claude-opus-4-6-thinking' --effort 'high', and the new test reportsnot ok - Opus launch carried an incompatible effort flag.test_agy_other_model_effort_behavior_is_preserved.error: agy model 'claude-opus-9-not-listed' is not listed by 'agy models', and nothing typed into the pane.agy modelslistsclaude-opus-4-6-thinking, and--helpdocuments--effort (low|medium|high).bash tests/fm-agy-harness.test.shon target commit cb15ce0: every test passed, exit 0Base-versus-fix drive: twogit archive cb15ce0copies under /tmp, one withbin/fm-spawn.shfrom bd56fe5. Each ranfm-spawn.sh <id> <proj> --harness agy --model <m> --effort <e>for Opus/high, Opus/xhigh, gemini-3.8-flash-high/high, future-model/medium and an unlisted Opus-like id, then the three agy effort testsNew testtest_agy_opus_effort_is_recorded_and_disclosed_but_omittedrun against the base spawn script: failed with--effort 'low'in the launch, reproducing the bugagy --version,agy modelsandagy --help | grep -i effortagainst the installed agy 1.2.5 (read-only)git status --short: worktree clean after testing🔧 **Document** - 1 issue found → auto-fixed ✅
docs/verification/agy.md:85- The owner reference (.agents/skills/harness-adapters/references/harness/agy.md) was already updated by the change, and docs/verification/agy.md now points at the spawn omission and its regression test. However, the maintainer-verification record holds no dated command/output transcript for the empirical claim that native agy rejects --effort with claude-opus-4-6-thinking and falls back to Gemini; that observation is not present in the worktree, so it was not fabricated. If the author has the agy version, exact command, and output, add them under 'Model and effort' in docs/verification/agy.md.🔧 Fix applied.
✅ Re-checked - no issues remain.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.