Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .agents/skills/harness-adapters/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ The supported launch-profile flags below are verified locally; each row records
| codex | `--model <model>` | `-c 'model_reasoning_effort="<low\|medium\|high\|xhigh>"'` | Verified on codex-cli 0.142.1. The installed binary schema contains `model_reasoning_effort`, the active config uses it, and the bundled model catalog advertises only low/medium/high/xhigh. `max` is omitted. |
| grok | `--model <model>` | `--reasoning-effort <low\|medium\|high>` | Verified on grok 0.2.99 (2026-07-13). `--effort` is an alias, but firstmate's profile axis is reasoning effort. As of 0.2.99 the ceiling is `high`; both `xhigh` and `max` are rejected with `use one of: high, medium, low`, so firstmate omits them. |
| pi / pi-signed | `--model <model>` | `--thinking <low\|medium\|high\|xhigh\|max>` | Verified 2026-07-27 on Pi and pi-signed 0.82.0. Both expose the same accepted thinking levels and completed the same model-qualified max-thinking smoke. |
| opencode | `--model <provider/model>` | none for firstmate's interactive launch | Verified on opencode 1.17.6. `opencode run` has `--variant`, but firstmate launches the interactive `opencode --prompt` path, which has no verified effort flag. |
| opencode | `--model <provider/model>` | none for firstmate's interactive launch | Verified on opencode 1.17.6. `opencode run` has `--variant`, but firstmate launches the interactive `opencode --prompt` path, which has no verified effort flag. Crewmate and scout launches also pin `--agent build` so a local `default_agent` cannot silently change the worker role; secondmate launches omit `--agent` and keep their officer agent selection. |
| kimi | `--model <model>` | none | Verified 2026-07-25 on Kimi Code CLI 0.29.1. |

### Model support discovery
Expand Down
8 changes: 7 additions & 1 deletion bin/fm-spawn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,13 @@ launch_template() {
printf '%s' 'codex __MODELFLAG____EFFORTFLAG__--dangerously-bypass-approvals-and-sandbox -c "notify=[\"bash\",\"-c\",\"touch __TURNEND__\"]" "$(__OPINPUT__ encode launch-brief < __BRIEF__)"'
fi
;;
opencode) printf '%s' 'OPENCODE_CONFIG_CONTENT='\''{"permission":{"*":"allow"}}'\'' opencode __MODELFLAG__--prompt "$(__OPINPUT__ encode launch-brief < __BRIEF__)"' ;;
opencode)
if [ "$kind" = secondmate ]; then
printf '%s' 'OPENCODE_CONFIG_CONTENT='\''{"permission":{"*":"allow"}}'\'' opencode __MODELFLAG__--prompt "$(__OPINPUT__ encode launch-brief < __BRIEF__)"'
else
printf '%s' 'OPENCODE_CONFIG_CONTENT='\''{"permission":{"*":"allow"}}'\'' opencode --agent build __MODELFLAG__--prompt "$(__OPINPUT__ encode launch-brief < __BRIEF__)"'
fi
;;
pi|pi-signed)
if [ "$kind" = secondmate ]; then
printf '%s%s' "$harness" ' __MODELFLAG____EFFORTFLAG__-e __PITURNEND__ -e __PIWATCH__ "$(__OPINPUT__ encode launch-brief < __BRIEF__)"'
Expand Down
9 changes: 5 additions & 4 deletions tests/fm-kimi-harness.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@ assert_source_line() {
grep -Fqx -- "$line" "$SPAWN" || fail "existing launch template changed: $line"
}

test_existing_launch_templates_are_byte_pinned() {
test_launch_templates_are_byte_pinned() {
assert_source_line " claude) printf '%s' 'CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=false claude --dangerously-skip-permissions __MODELFLAG____EFFORTFLAG__\"\$(__OPINPUT__ encode launch-brief < __BRIEF__)\"' ;;"
assert_source_line " printf '%s' 'codex __MODELFLAG____EFFORTFLAG__--dangerously-bypass-approvals-and-sandbox \"\$(__OPINPUT__ encode launch-brief < __BRIEF__)\"'"
assert_source_line " printf '%s' 'codex __MODELFLAG____EFFORTFLAG__--dangerously-bypass-approvals-and-sandbox -c \"notify=[\\\"bash\\\",\\\"-c\\\",\\\"touch __TURNEND__\\\"]\" \"\$(__OPINPUT__ encode launch-brief < __BRIEF__)\"'"
assert_source_line " opencode) printf '%s' 'OPENCODE_CONFIG_CONTENT='\\''{\"permission\":{\"*\":\"allow\"}}'\\'' opencode __MODELFLAG__--prompt \"\$(__OPINPUT__ encode launch-brief < __BRIEF__)\"' ;;"
assert_source_line " printf '%s' 'OPENCODE_CONFIG_CONTENT='\\''{\"permission\":{\"*\":\"allow\"}}'\\'' opencode __MODELFLAG__--prompt \"\$(__OPINPUT__ encode launch-brief < __BRIEF__)\"'"
assert_source_line " printf '%s' 'OPENCODE_CONFIG_CONTENT='\\''{\"permission\":{\"*\":\"allow\"}}'\\'' opencode --agent build __MODELFLAG__--prompt \"\$(__OPINPUT__ encode launch-brief < __BRIEF__)\"'"
assert_source_line " printf '%s%s' \"\$harness\" ' __MODELFLAG____EFFORTFLAG__-e __PITURNEND__ -e __PIWATCH__ \"\$(__OPINPUT__ encode launch-brief < __BRIEF__)\"'"
assert_source_line " printf '%s%s' \"\$harness\" ' __MODELFLAG____EFFORTFLAG__-e __PIEXT__ \"\$(__OPINPUT__ encode launch-brief < __BRIEF__)\"'"
assert_source_line " grok) printf '%s' 'grok --always-approve __MODELFLAG____EFFORTFLAG__\"\$(__OPINPUT__ encode launch-brief < __BRIEF__)\"' ;;"
pass "fm-spawn: the five pre-existing adapters' launch templates stay byte-pinned"
pass "fm-spawn: verified adapter launch templates stay byte-pinned"
}

test_tracked_files_have_no_user_absolute_paths() {
Expand Down Expand Up @@ -674,7 +675,7 @@ test_kimi_bordered_prompt_needs_no_override() {
}

test_tracked_files_have_no_user_absolute_paths
test_existing_launch_templates_are_byte_pinned
test_launch_templates_are_byte_pinned
test_kimi_hook_install_is_surgical_idempotent_and_removable
test_kimi_hook_remove_preserves_owned_newline_boundary
test_kimi_hook_fails_closed_on_missing_malformed_or_partial_config
Expand Down
49 changes: 46 additions & 3 deletions tests/fm-spawn-dispatch-profile.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -327,12 +327,53 @@ test_opencode_threads_model_and_ignores_effort_axis() {
expect_code 0 "$status" "opencode spawn with model and ignored effort should succeed"
assert_meta_profile "$HOME_DIR/state/$id.meta" opencode anthropic/claude-sonnet-4-5 high
launch=$(cat "$LAUNCH_LOG")
assert_contains "$launch" "opencode --model 'anthropic/claude-sonnet-4-5' --prompt" \
"opencode launch did not thread model"
assert_contains "$launch" "opencode --agent build --model 'anthropic/claude-sonnet-4-5' --prompt" \
"opencode worker launch did not name the build agent and thread the model"
assert_not_contains "$launch" "--effort" "opencode launch must not pass unsupported --effort"
assert_not_contains "$launch" "--variant" "opencode launch must not pass run-only --variant"
assert_not_contains "$launch" "--thinking" "opencode launch must not pass pi thinking flag"
pass "opencode receives --model and omits the unsupported effort axis"
pass "opencode workers name the build agent, receive --model, and omit the unsupported effort axis"
}

test_opencode_scout_names_build_agent() {
local rec id out status launch
id=profile-opencode-scout-z7b
rec=$(make_spawn_case profile-opencode-scout opencode "$id")
read_case_record "$rec"

out=$(run_spawn "$HOME_DIR" "$WT_DIR" "$FAKEBIN_DIR" "$LAUNCH_LOG" \
"$id" "$PROJ_DIR" --model openai/gpt-5.6-terra --scout)
status=$?
expect_code 0 "$status" "opencode scout spawn should succeed"
assert_contains "$out" "spawned $id harness=opencode kind=scout" \
"opencode scout spawn did not preserve its task kind"
launch=$(cat "$LAUNCH_LOG")
assert_contains "$launch" "opencode --agent build --model 'openai/gpt-5.6-terra' --prompt" \
"opencode scout launch did not name the build agent and thread the model"
pass "opencode scouts name the build agent and preserve the selected model"
}

test_opencode_secondmate_preserves_officer_agent_selection() {
local rec id sm out status launch
id=profile-opencode-secondmate-z7c
rec=$(make_spawn_case profile-opencode-secondmate opencode "$id")
read_case_record "$rec"
sm="$CASE_DIR/secondmate-home"
make_seeded_secondmate_home "$sm" "$id"
sm=$(cd "$sm" && pwd -P)

out=$(run_spawn "$HOME_DIR" "$WT_DIR" "$FAKEBIN_DIR" "$LAUNCH_LOG" \
"$id" "$sm" --model openai/gpt-5.6-sol --secondmate)
status=$?
expect_code 0 "$status" "opencode secondmate spawn should succeed"
assert_contains "$out" "spawned $id harness=opencode kind=secondmate" \
"opencode secondmate spawn did not preserve its officer task kind"
launch=$(cat "$LAUNCH_LOG")
assert_contains "$launch" "opencode --model 'openai/gpt-5.6-sol' --prompt" \
"opencode secondmate launch did not preserve the selected model"
assert_not_contains "$launch" "--agent" \
"opencode secondmate launch must preserve its existing officer agent selection"
pass "opencode secondmates preserve officer agent selection while retaining the selected model"
}

test_pi_threads_model_and_max_effort() {
Expand Down Expand Up @@ -521,6 +562,8 @@ test_grok_threads_model_and_reasoning_effort
test_grok_omits_invalid_max_reasoning_effort
test_grok_omits_invalid_xhigh_reasoning_effort
test_opencode_threads_model_and_ignores_effort_axis
test_opencode_scout_names_build_agent
test_opencode_secondmate_preserves_officer_agent_selection
test_pi_threads_model_and_max_effort
test_pi_signed_threads_shared_pi_profile_and_preserves_identity
test_pi_signed_missing_binary_refuses_before_endpoint_or_metadata
Expand Down