Skip to content

fix(placement): remove subagent model allowlist, prefer loaded then host default - #94

Merged
androidand merged 2 commits into
devfrom
fix/loaded-model-bypasses-allowlist
Sep 20, 2026
Merged

androidand merged 2 commits into
devfrom
fix/loaded-model-bypasses-allowlist

Conversation

@androidand

Copy link
Copy Markdown
Owner

Summary

  • A subagent delegated to a host with a model already loaded got evicted for a different model — local_subagent_placement_models acted as an eligibility filter that ran before the "prefer already loaded" scoring bonus could ever apply.
  • Removed the allowlist entirely: hand-curated, undiscoverable (no docs, no CLI, no warning on silent eviction), and for a self-curated local fleet the failure it guarded against (a model flubbing tool-call JSON) is a one-time visible bad turn, not silent corruption.
  • New priority in bestModel(): loaded model > host's own configured default model (GET /api/config/info, already exposed by llama-skein but never consulted here) > parent's own model > plain fit/speed scoring.
  • Also includes a small unrelated fork-manifest fix: registers lifecycle-inject.test.ts (added in fix(peer): resolve InstanceRef before any session-scoped call in sidecar delivery #93) as an owned fork file — fork:verify only catches a missing registration pre-push, so it slipped through on the last PR.

Test plan

  • placement.test.ts updated/extended: residency beats an allowlisted-cold model, host default beats plain fit/speed, host default beats parent's model, residency still beats host default.
  • bun test test/local/ — 320 pass (1 unrelated pre-existing failure confirmed present on unmodified code too — stale hostname fixture).
  • bun turbo typecheck — 30/30 clean.
  • bun run fork:verify — 0 unregistered divergence.

🤖 Generated with Claude Code

androidand and others added 2 commits September 20, 2026 23:39
…ost default

A subagent delegated to a host with a model already loaded got evicted for
a different model, because local_subagent_placement_models acted as an
eligibility filter that ran before the "prefer already loaded" scoring
bonus could ever apply — a resident model not on the (manually maintained,
undiscoverable) allowlist lost to an allowlisted cold one, paying a
multi-second model swap for no real benefit.

Remove the allowlist entirely: it required hand-curating every model ever
installed with no config surface, docs, or warning when it silently evicted
a resident model, and for a self-curated local fleet the failure it guarded
against (a model flubbing tool-call JSON) is a one-time visible bad turn,
not silent corruption.

New priority in bestModel(): loaded > host's own configured default model
(GET /api/config/info, already exposed by llama-skein but never consulted
here) > parent's own model > plain fit/speed scoring. Every registered,
tool-call-capable model is now eligible; residency and the host's default
decide ties instead of a global allowlist.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Omitted from the fork manifest when it was added in #93 (the InstanceRef
sidecar-delivery fix) — fork:verify only caught it on the next push, since
it runs pre-push, not pre-commit.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@androidand
androidand merged commit b3c2243 into dev Sep 20, 2026
3 of 4 checks passed
@github-actions

Copy link
Copy Markdown

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@androidand
androidand deleted the fix/loaded-model-bypasses-allowlist branch September 20, 2026 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant