Commit 2dfa6336f changed Metis primary model from claude-opus-4-7 max
to claude-sonnet-4-6 in src/shared/model-requirements.ts but only
updated the unit test in model-requirements.test.ts. The CLI installer
end-to-end snapshot test (src/cli/model-fallback.test.ts) generates
configs from those same fallback chains via generateModelConfig and
captures them as snapshots, so 17 snapshot assertions broke.
Snapshots regenerated with `bun test src/cli/model-fallback.test.ts -u`.
Verified 86/86 pass across model-requirements + model-fallback +
openai-only-model-catalog test files.
The change is a no-op for the web import that this PR is primarily
about — including it here to unblock CI on dev (where the breakage
landed) rather than spinning up a separate hotfix PR.
The previous commit (2dfa6336f) used 'git add -A' which swept up files that
prior commits had intentionally deleted but were still present untracked in
the local workspace. This commit re-deletes them to match the upstream intent.
Files removed (each was previously deleted in the cited commit):
- drafts/gpt-5-5/{README,deep,hephaestus,oracle,sisyphus-junior,sisyphus}.md
(deleted in 40ded422c chore(drafts): remove stale gpt-5.5 prompt drafts)
- src/plugin-dispose.{ts,test.ts}
(deleted in e2f5c0d36 refactor(plugin): remove orphaned createPluginDispose)
- src/features/tmux-subagent/{cleanup,session-created-handler,session-deleted-handler}.ts
(deleted in 7a7926f22 chore(tmux-subagent): remove dead event-handler modules)
- src/tools/delegate-task/{model-string-parser,resolve-call-id,resolve-call-id.test}.ts
(model-string-parser deleted in db056346d; resolve-call-id was scratch)
- src/__debug-test.test.ts (debug scratch never intended for git)
Typecheck + model-requirements tests still pass. The legitimate metis +
AGENTS.md edits from the previous commit remain on dev.
Source code change:
- src/shared/model-requirements.ts: prepend claude-sonnet-4-6 to metis fallback
chain so Sonnet becomes the default. Opus 4.7 max remains as the immediate
fallback for callers who want extra reasoning.
- src/shared/model-requirements.test.ts: update assertion to expect Sonnet
primary + Opus secondary.
AGENTS.md accuracy fixes (verified against source):
- Agent modes: Sisyphus/Hephaestus are 'primary' (not 'all'); Sisyphus-Junior
is 'subagent' (not 'all'). Confirmed via 'const MODE: AgentMode = ...' in
each agent file. Also clarified Prometheus has no agentSources factory and
is built via buildPrometheusAgentConfig.
- Sisyphus fallback chain: corrected order to kimi-k2.6 → k2p5 → kimi-k2.5
→ gpt-5.5 medium → glm-5 → big-pickle (was missing kimi-k2.5).
- Librarian/Explore: added missing minimax-m2.7 step between -highspeed and
claude-haiku-4-5.
- Metis chain: removed fictitious gemini-3.1-pro entry.
- Sisyphus-Junior chain: spelled out the actual fallback (was 'user-configurable').
- Temperatures: Sisyphus/Hephaestus do not set explicit temperature (model
default); Sisyphus-Junior is 0.1 via SISYPHUS_JUNIOR_DEFAULTS.
- Quick category default: gpt-5.4-mini (not gpt-5.4-mini-fast).
Team-mode corrections:
- Eligibility registry has 3 verdicts: eligible (sisyphus, atlas, sisyphus-junior),
conditional (hephaestus — needs D-36 teammate permission), hard-reject
(oracle, librarian, explore, multimodal-looker, metis, momus, prometheus).
- Schema has 11 fields, not 4: added max_messages_per_run, max_wall_clock_minutes,
max_member_turns, base_dir, message_payload_max_bytes, recipient_unread_max_bytes,
mailbox_poll_interval_ms.
- Hooks: 'team-session-events' is 4 sub-handlers in src/plugin/event.ts
(team-idle-wake-hint, team-lead-orphan-handler, team-member-error-handler,
team-member-status-handler), not a single Continuation-tier hook.
- Tier counts now show base + team-mode: ToolGuard 14/15, Transform 5/7.
- Total: 52 base hooks, 59 with team-mode.
Doc cascade for the Metis change:
- docs/guide/orchestration.md, agent-model-matching.md, installation.md
- docs/reference/configuration.md, features.md
OpenCode Desktop 1.14.x filters agents by `mode` field. The `mode` was
only present on the factory function as a static property, but not copied
to the generated AgentConfig object.
This fix copies `source.mode` to `base.mode` in `buildAgent()` when:
- source is a factory function (has `mode` static property)
- the generated config doesn't already define `mode`
Test: agent-builder.test.ts (4 pass)
Closes: #3835
Related: #3762, #3812, #3794, #3475, #3474, #3829, #3831, #3824, #3826, #3721, #3806, #3188
The caller-facing description told orchestrators WHAT `deep` is but
never specified goal cardinality, so they bundled multiple goals into
one call (e.g. "fix X + merge Y + deploy Z"). The deep agent's own
prompt was already configured to refuse such bundles, but only after
they arrived. The rule now lives on the caller side: ONE goal + ONE
deliverable per call; multiple goals must fan out as parallel `deep`
calls.
Uses new Function() to prevent the static ESM loader from seeing
the bun: protocol import at parse time. In Electron/Node.js, the
import() call is evaluated at runtime and gracefully returns null
when bun:sqlite is unavailable.
Fixes#3829, likely fixes#3762
- Remove plugin_loaded telemetry from index.ts (was 46.5% of all events, ~2.83M/month)
- Add enableLocalEvaluation: false to prevent feature flag polling/decide calls
- Add strictLocalEvaluation: true to prevent server fallback requests
- Add disableRemoteConfig: true to prevent remote config network requests
- Remove 'plugin_loaded' from PostHogActivityReason type
- Update tests: remove stale mocks, add SDK options verification test
- enableExceptionAutocapture: false already present (kept)
Estimated billing reduction: ~$960+/month from feature flag requests,
plus ~2.83M fewer events/month from plugin_loaded removal.
- DEEP_CATEGORY_PROMPT_APPEND_GPT_5_3_CODEX preserving all DEEP knowledge (atomic task treatment, root cause bias, ambition scaled, completion bar, status sparse) plus codex-specific additions: bias to action, parallel-batch exploration, code implementation discipline, worktree safety, plan closure, pragmatic final-message format\n- resolveDeepCategoryPromptAppend now routes codex first, then 5.5, else legacy (preserves existing 5.5 and 5.4 test invariants)\n- Tests: assert codex no longer falls back to legacy, content tests mirroring the 5.5 pattern (style markers, knowledge preservation, parallel-batch framing, materially different from siblings)
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
- Add isGpt5_2Model type guard\n- ORACLE_GPT_5_2_PROMPT consolidating all knowledge from Claude default, GPT-5.4 generic, and GPT-5.5 variants (XML-tagged blocks, concrete verbosity clamps, long-context re-grounding, anti-narration tool rules, high-risk self-check)\n- MOMUS_GPT_5_2_PROMPT preserving blocker-finder philosophy with new tool_usage_rules block for parallel reference verification\n- Momus GPT-5.2 reasoningEffort set to xhigh per evaluation rigor needs
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Agent names like \hephaestus\ cause 'Agent not found' errors because
sanitizeSubagentType() was only called in subagent-resolver.ts but not
in the direct manager.launch() path or background-executor.ts.
- manager.ts: strip leading/trailing backslash/quote chars from input.agent
before validation so \hephaestus\ → hephaestus
- background-executor.ts: call sanitizeSubagentType(args.subagent_type)
instead of passing raw value to manager.launch()
- agent-display-names.ts: reuse sanitizeSubagentType in stripAgentListSortPrefix
- Add unit tests for all three fix points
Fixes: sessions dying with 'Agent not found: \hephaestus\'
Restore consistent assertion style in librarian and explore tests.
Multi-provider entries like ["opencode-go", "vercel"] should use
toContain() not providers[0].toBe() to match the established pattern.
kimi-k2.6 is referenced in fallback chains but missing from the bundled snapshot (which only has kimi-k2.5). Added supplemental entry with specs matching models.dev data.
Stop the walk at the start directory when it sits outside $HOME so the
walker never falls through to filesystem root. Without this guard a
project at /tmp/x or /opt/projects/foo would surface unrelated configs
in /tmp, /opt, or / itself.
Also clean up reviewer-flagged friction:
- Rename ancestor path/override variables to *NearestFirst /
*FarthestFirst so the merge order is self-documenting and the
mid-flight `.slice().reverse()` is no longer surprising.
- Rename `migrateLegacyAndResolveCanonicalPath` to
`resolveConfigPathAfterLegacyMigration` to reflect that the helper
returns the path to load, which may still be the legacy path when
migration could not run.
- Replace `Object.assign({}, ...overrides)` with a named accumulator
loop so the closer-wins ordering is obvious from the code instead of
relying on a comment.
Tests added:
- start directory outside $HOME does not walk above itself
- multi-ancestor git_master merge order (closer wins, distant fields
still flow through)
- agent_definitions in an ancestor resolves against that ancestor's own
.opencode/ base path, not the start directory's
Closes#417.
The user config (`~/.config/opencode/oh-my-openagent.json[c]`) is no
longer the only level above the project. `loadPluginConfig` now walks
from the working directory up to `$HOME` (inclusive), collecting every
`.opencode/oh-my-openagent.json[c]` it finds along the way. Configs
closer to the working directory override configs farther up, allowing
per-tree setups like:
~/work/.opencode/oh-my-openagent.json # work credentials
~/dev/.opencode/oh-my-openagent.json # personal credentials
~/.config/opencode/oh-my-openagent.json # global fallback
This subsumes the previous single project-config load: the project's
own config is just the closest hit of the walk. `agent_definitions`
relative paths resolve against each ancestor's own `.opencode/` base,
`git_master` overrides accumulate across the walk (closer wins), and
legacy basenames are migrated wherever they appear.
`mcp_env_allowlist` is intentionally NOT extensible from walked
ancestors. It remains user-only as a security boundary so a malicious
or untrusted parent directory cannot extend the env var allowlist used
during ${VAR} expansion in `.mcp.json` files. The existing test that
pins this behaviour is extended to cover the multi-ancestor case.
`os.homedir()` caches in Bun, so the stop directory is resolved by
reading `process.env.HOME` directly. Production behaviour is unchanged
because the OS sets HOME at startup; tests can now redirect the walk
boundary by setting HOME to a temp directory before each call.