From 7837dea16d0fb0047ee99e82a053710dec310115 Mon Sep 17 00:00:00 2001 From: Ian Pascoe Date: Sun, 26 Apr 2026 06:57:55 -0400 Subject: [PATCH 1/3] fix: harden reasoning effort edge cases --- README.md | 53 +++++++++++++++++++ src/index.test.ts | 127 ++++++++++++++++++++++++++++++++++++++++++++++ src/index.ts | 30 +++++++---- 3 files changed, 199 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 1ff4c7f..c4c1b76 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,24 @@ The plugin injects adaptive-thinking guidance into the system prompt and exposes a tool for switching to one of the current model's valid reasoning-effort variants. +## Requirements + +- OpenCode with plugin support compatible with `@opencode-ai/plugin` `^1.14.24`. +- A selected model that exposes reasoning-effort variants such as `none`, `low`, `medium`, `high`, or `xhigh`. + +## Installation + +Add the package to your OpenCode config plugin list: + +```json +{ + "$schema": "https://opencode.ai/config.json", + "plugin": ["opencode-adaptive-thinking"] +} +``` + +To customize behavior, use the tuple form shown in the configuration example below. + ## Configuration The plugin accepts these optional settings: @@ -44,6 +62,41 @@ The plugin accepts these optional settings: } ``` +## Behavior + +Agents receive system guidance to actively choose the lowest reasoning effort that can safely complete the task. The plugin also exposes the configured tool, `set_reasoning_effort` by default, with these arguments: + +- `level`: one of the valid reasoning-effort variants for the current model. +- `persist`: when `true`, keep the selected effort for the session. When `false` or omitted, apply it temporarily and reset to the previous effort after `session.idle`. + +Example temporary change: + +```json +{ + "level": "high", + "persist": false +} +``` + +Example persisted change: + +```json +{ + "level": "low", + "persist": true +} +``` + +The system prompt lists the valid levels for the current session. Cached session state is only used when it is still valid for the current model, so switching models will not advertise or reuse an invalid effort level. + +## Troubleshooting + +If the tool returns `no valid reasoning effort levels are available for this session`, check that the active model exposes variants in OpenCode. Some providers or models may not support reasoning-effort levels. + +If the tool returns `Invalid reasoning effort level`, use one of the levels listed in the system prompt for the current session. + +If configuration errors appear, check the plugin options against the documented keys and value types. Set `quiet` to `true` to suppress configuration error toasts while still writing details to the OpenCode logs. + ## Development ```bash diff --git a/src/index.test.ts b/src/index.test.ts index fa0ee6d..a059845 100644 --- a/src/index.test.ts +++ b/src/index.test.ts @@ -68,6 +68,15 @@ const createMessage = (variant = "medium") => ({ parts: [], }); +const createAgentMessage = (agent: string) => ({ + info: { + id: `message-${agent}`, + role: "user", + agent, + }, + parts: [], +}); + const setReasoningEffort = async ( plugin: Awaited>, args: { level: string; persist: boolean }, @@ -135,6 +144,24 @@ describe("AdaptiveThinkingPlugin", () => { }); }); + test("suppresses configuration error toast when quiet is enabled", async () => { + const { client } = createClient("quiet-invalid-config"); + const plugin = await AdaptiveThinkingPlugin({ client } as never, { + enabled: "yes", + quiet: true, + }); + + expect(plugin).toEqual({}); + expect(client.tui.showToast).not.toHaveBeenCalled(); + expect(client.app.log).toHaveBeenCalledWith({ + body: expect.objectContaining({ + level: "error", + service: "opencode-adaptive-thinking", + message: expect.stringContaining("Invalid Adaptive Thinking plugin configuration"), + }), + }); + }); + test("keeps log service name internal", async () => { const sessionID = "fixed-service-name"; const { client, toolContext } = createClient(sessionID); @@ -202,6 +229,57 @@ describe("AdaptiveThinkingPlugin", () => { expect(system[0]).not.toContain("You MUST manage reasoning effort actively"); }); + test("ignores cached reasoning effort when it is invalid for the current model", async () => { + const sessionID = "stale-cached-variant"; + const switchedModelVariants = { + low: {}, + medium: {}, + }; + const { client, toolContext } = createClient(sessionID, [createMessage("medium")]); + const plugin = await AdaptiveThinkingPlugin({ client } as never); + const system: string[] = []; + + await setReasoningEffort(plugin, { level: "high", persist: true }, toolContext); + await plugin["experimental.chat.system.transform"]!( + { + sessionID, + model: { variants: switchedModelVariants }, + } as never, + { system }, + ); + + expect(system[0]).toContain("Current reasoning effort level: medium."); + expect(system[0]).toContain("Valid reasoning effort levels for this session: low, medium."); + expect(system[0]).not.toContain("Current reasoning effort level: high."); + }); + + test("falls back to the newest agent variant when messages do not expose a model variant", async () => { + const sessionID = "newest-agent-fallback"; + const { client } = createClient(sessionID, [ + createAgentMessage("old-agent"), + createAgentMessage("new-agent"), + ]); + client.app.agents.mockResolvedValueOnce({ + data: [ + { name: "old-agent", variant: "high" }, + { name: "new-agent", variant: "low" }, + ], + error: undefined, + } as never); + const plugin = await AdaptiveThinkingPlugin({ client } as never); + const system: string[] = []; + + await plugin["experimental.chat.system.transform"]!( + { + sessionID, + model: { variants }, + } as never, + { system }, + ); + + expect(system[0]).toContain("Current reasoning effort level: low."); + }); + test("resets a temporary reasoning effort once and keeps the reset prompt ignored", async () => { const sessionID = "temporary-reset"; const { client, toolContext } = createClient(sessionID, [createMessage("medium")]); @@ -267,4 +345,53 @@ describe("AdaptiveThinkingPlugin", () => { expect(result).toContain("Invalid reasoning effort level"); expect(client.session.promptAsync).not.toHaveBeenCalled(); }); + + test("handles provider lookup failure without prompting", async () => { + const sessionID = "provider-lookup-failure"; + const { client, toolContext } = createClient(sessionID, [createMessage("medium")]); + client.provider.list.mockResolvedValueOnce({ + error: { data: { message: "provider unavailable" } }, + } as never); + const plugin = await AdaptiveThinkingPlugin({ client } as never); + + const result = await setReasoningEffort(plugin, { level: "high", persist: true }, toolContext); + + expect(result).toContain("no valid reasoning effort levels"); + expect(client.session.promptAsync).not.toHaveBeenCalled(); + expect(client.app.log).toHaveBeenCalledWith({ + body: expect.objectContaining({ + level: "error", + message: expect.stringContaining("Failed to retrieve providers"), + }), + }); + }); + + test("retries a failed temporary reset and clears it after a later success", async () => { + const sessionID = "recoverable-reset-failure"; + const { client, toolContext } = createClient(sessionID, [createMessage("medium")]); + client.session.promptAsync + .mockResolvedValueOnce({ error: undefined } as never) + .mockResolvedValueOnce({ error: { data: { message: "reset failed" } } } as never) + .mockResolvedValueOnce({ error: undefined } as never); + const plugin = await AdaptiveThinkingPlugin({ client } as never); + + await setReasoningEffort(plugin, { level: "low", persist: false }, toolContext); + await plugin.event!({ + event: { type: "session.idle", properties: { sessionID } }, + } as never); + await plugin.event!({ + event: { type: "session.idle", properties: { sessionID } }, + } as never); + await plugin.event!({ + event: { type: "session.idle", properties: { sessionID } }, + } as never); + + expect(client.session.promptAsync).toHaveBeenCalledTimes(3); + expect(client.app.log).toHaveBeenCalledWith({ + body: expect.objectContaining({ + level: "error", + message: expect.stringContaining("Failed to reset reasoning effort"), + }), + }); + }); }); diff --git a/src/index.ts b/src/index.ts index de99324..ec6cc14 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,7 @@ import { tool, type Plugin } from "@opencode-ai/plugin"; import type { Agent, Message, Model, Part, Provider } from "@opencode-ai/sdk/v2"; import { ConfigSchema } from "./config.js"; +import type { OpencodeClient } from "@opencode-ai/sdk"; const z = tool.schema; const serviceName = "opencode-adaptive-thinking"; @@ -41,18 +42,24 @@ class SessionStateCache { const state = new SessionStateCache(maxSessionStateSize); -export const AdaptiveThinkingPlugin: Plugin = async ({ client }, options) => { - type PromptAsyncOptions = Parameters[0]; - type PromptAsyncBody = NonNullable & { variant: string }; +type PromptAsyncOptions = Parameters[0]; +type PromptAsyncBody = NonNullable & { variant: string }; +export const AdaptiveThinkingPlugin: Plugin = async ({ client }, options) => { const configParseResult = ConfigSchema.safeParse(options); if (!configParseResult.success) { - client.tui.showToast({ - body: { - variant: "error", - message: "Invalid Adaptive Thinking plugin configuration, see logs for details", - }, - }); + const quiet = + typeof options === "object" && options !== null && "quiet" in options + ? options.quiet === true + : false; + if (!quiet) { + client.tui.showToast({ + body: { + variant: "error", + message: "Invalid Adaptive Thinking plugin configuration, see logs for details", + }, + }); + } client.app.log({ body: { service: serviceName, @@ -166,7 +173,7 @@ export const AdaptiveThinkingPlugin: Plugin = async ({ client }, options) => { if ("model" in message.info && message.info.model.variant) { return message.info.model.variant; } - agentName = message.info.agent; + agentName ??= message.info.agent; } if (!agentName) return; @@ -281,7 +288,8 @@ export const AdaptiveThinkingPlugin: Plugin = async ({ client }, options) => { if (variants.length === 0) return; const sessionState = state.get(sessionID); - let variant = sessionState?.currentVariant ?? sessionState?.persistedVariant; + const cachedVariant = sessionState?.currentVariant ?? sessionState?.persistedVariant; + let variant = cachedVariant && variants.includes(cachedVariant) ? cachedVariant : undefined; if (!variant) { const resolvedVariant = await resolveCurrentVariant(sessionID); if (resolvedVariant && variants.includes(resolvedVariant)) { From 3c7dad1f13448d2204af723866aa9de221649be9 Mon Sep 17 00:00:00 2001 From: Ian Pascoe Date: Sun, 26 Apr 2026 06:58:04 -0400 Subject: [PATCH 2/3] docs: add brv reasoning context --- .../plugin_options_configurability.md | 32 ++++++----- .../facts/preference/reasoning_effort.md | 8 +-- .../bounded_session_state_lru_cache.md | 48 ++++++++++++++++ .../project/git_branch_checkout_safety.md | 8 +-- .../project/git_stash_reapply_outcome.md | 8 +-- .../facts/project/pr_push_outcome.md | 8 +-- .../project/reasoning_effort_behavior.md | 46 ++++++++++----- .../project/reasoning_effort_confirmation.md | 8 +-- .../reasoning_effort_medium_handling.md | 8 +-- .../reasoning_effort_reset_behavior.md | 8 +-- .../project/reasoning_effort_reset_message.md | 8 +-- .../project/reasoning_effort_reset_notice.md | 8 +-- ...easoning_effort_reset_notice_visibility.md | 8 +-- .../reasoning_effort_state_handling.md | 8 +-- .../pull_requests/context.md | 3 + .../contract_parity_matrix_review.md | 52 +++++++++++++++++ .../pull_requests/pr_24458_compliance_fix.md | 56 +++++++++++++++++++ .../pr_24458_ecosystem_plugin_addition.md | 37 ++++++++++++ .../pr_317_plugin_entry_added.md | 46 +++++++++++++++ .../pr_3_plugin_configurable_options.md | 8 +-- .../pull_requests/pr_3_test_pruning.md | 8 +-- .../pr_5_default_plugin_options_follow_up.md | 8 +-- ...replacement_for_default_options_changes.md | 8 +-- 23 files changed, 350 insertions(+), 90 deletions(-) create mode 100644 .brv/context-tree/facts/project/bounded_session_state_lru_cache.md create mode 100644 .brv/context-tree/project_management/pull_requests/contract_parity_matrix_review.md create mode 100644 .brv/context-tree/project_management/pull_requests/pr_24458_compliance_fix.md create mode 100644 .brv/context-tree/project_management/pull_requests/pr_24458_ecosystem_plugin_addition.md create mode 100644 .brv/context-tree/project_management/pull_requests/pr_317_plugin_entry_added.md diff --git a/.brv/context-tree/architecture/plugin_options/plugin_options_configurability.md b/.brv/context-tree/architecture/plugin_options/plugin_options_configurability.md index 11d5e90..568b54a 100644 --- a/.brv/context-tree/architecture/plugin_options/plugin_options_configurability.md +++ b/.brv/context-tree/architecture/plugin_options/plugin_options_configurability.md @@ -1,18 +1,18 @@ --- title: Plugin Options Configurability -summary: AdaptiveThinkingPlugin now supports configurable enabled/quiet flags, service and tool naming, custom tool descriptions and system prompts, with invalid config logging and disabled-plugin no-op behavior. +summary: Plugin options now support enabled, quiet, toolName, toolDescription, and systemPrompt; serviceName is removed from public config and defaults remain functional. tags: [] -related: [facts/project/reasoning_effort_behavior.md, facts/project/reasoning_effort_confirmation.md] +related: [facts/project/reasoning_effort_behavior.md, facts/project/reasoning_effort_confirmation.md, project_management/pull_requests/pr_6_replacement_for_default_options_changes.md] keywords: [] createdAt: '2026-04-25T12:40:26.166Z' -updatedAt: '2026-04-25T12:49:59.689Z' +updatedAt: '2026-04-25T17:44:35.947Z' --- ## Reason -Document configurable plugin options and validation behavior for the adaptive thinking plugin +Capture the plugin configuration surface and defaults. ## Raw Concept **Task:** -Document the configurable plugin options added to AdaptiveThinkingPlugin. +Document plugin configuration support and default behavior **Changes:** - Identified that the current plugin behavior is hard-coded in src/index.ts @@ -27,6 +27,9 @@ Document the configurable plugin options added to AdaptiveThinkingPlugin. - Added tests for config behavior - Updated README with config docs and example - Added a minor changeset +- Added plugin config support for enabled, quiet, toolName, toolDescription, and systemPrompt +- Removed serviceName from public config +- Kept internal log service fixed as opencode-adaptive-thinking **Files:** - src/index.ts @@ -37,21 +40,21 @@ Document the configurable plugin options added to AdaptiveThinkingPlugin. - .changeset/configurable-plugin-options.md **Flow:** -load config -> validate with Zod -> if invalid log and toast -> if disabled return {} -> otherwise expose configured tool and guidance +plugin loads config -> validates with Zod -> applies defaults -> runs with optional overrides **Timestamp:** 2026-04-25 -**Author:** Ian +**Author:** assistant ## Narrative ### Structure -The implementation centralizes plugin configuration in src/config.ts and threads the validated options into AdaptiveThinkingPlugin so runtime behavior and exposed tool metadata can be customized. +Configuration is defined in src/config.ts, consumed by src/index.ts, and documented in README.md. Tests cover disabled plugin behavior, invalid config handling, custom tool metadata, custom system prompt, and default-options regression. ### Dependencies -Depends on the existing opencode-byterover config pattern, Zod validation, and the plugin runtime that shows toasts and logs errors on invalid configuration. +Uses Zod for schema validation and relies on high-signal tests to protect the public config surface. ### Highlights -Tests, typecheck, lint, format check, and build all passed after the implementation. Validation only found formatting drift in src/index.test.ts before formatting was applied. +The config surface is intentionally kept small and does not expose serviceName. Default behavior is treated as a regression requirement. ### Rules Curate only information with lasting value: facts, decisions, technical details, preferences, or notable outcomes. @@ -60,8 +63,7 @@ Curate only information with lasting value: facts, decisions, technical details, Example options include enabled, quiet, serviceName, toolName, toolDescription, and systemPrompt. ## Facts -- **config_pattern**: The plugin uses the opencode-byterover config pattern. [project] -- **plugin_options**: Supported options are enabled, quiet, serviceName, toolName, toolDescription, and systemPrompt. [project] -- **invalid_config_behavior**: Invalid config logs an error, shows a toast, and returns {}. [project] -- **disabled_plugin_behavior**: Disabled plugin returns {}. [project] -- **tool_name_behavior**: Custom toolName updates both the exposed tool and the system prompt guidance. [project] +- **plugin_options**: The plugin supports configurable enabled, quiet, toolName, toolDescription, and systemPrompt options. [project] +- **service_name_config**: serviceName was removed from the public config surface. [project] +- **internal_log_service_name**: The internal log service name remains opencode-adaptive-thinking. [project] +- **default_options_behavior**: Default plugin behavior must continue working when no options are provided. [project] diff --git a/.brv/context-tree/facts/preference/reasoning_effort.md b/.brv/context-tree/facts/preference/reasoning_effort.md index 77d480a..2ffb939 100644 --- a/.brv/context-tree/facts/preference/reasoning_effort.md +++ b/.brv/context-tree/facts/preference/reasoning_effort.md @@ -1,10 +1,10 @@ --- -title: Reasoning Effort +createdAt: '2026-04-25T10:20:14.913Z' +keywords: [] +related: [facts/project/reasoning_effort_confirmation.md, facts/project/reasoning_effort_reset_message.md, facts/project/reasoning_effort_reset_notice.md, facts/project/reasoning_effort_reset_notice_visibility.md, facts/project/reasoning_effort_reset_behavior.md, facts/project/reasoning_effort_behavior.md, facts/project/reasoning_effort_state_handling.md, facts/project/reasoning_effort_medium_handling.md] summary: Reasoning effort preference is set to low. tags: [] -related: [] -keywords: [] -createdAt: '2026-04-25T10:20:14.913Z' +title: Reasoning Effort updatedAt: '2026-04-25T11:55:01.662Z' --- ## Reason diff --git a/.brv/context-tree/facts/project/bounded_session_state_lru_cache.md b/.brv/context-tree/facts/project/bounded_session_state_lru_cache.md new file mode 100644 index 0000000..f816730 --- /dev/null +++ b/.brv/context-tree/facts/project/bounded_session_state_lru_cache.md @@ -0,0 +1,48 @@ +--- +createdAt: '2026-04-25T17:44:36.487Z' +keywords: [] +related: [project_management/pull_requests/pr_6_replacement_for_default_options_changes.md, facts/project/reasoning_effort_state_handling.md, facts/project/reasoning_effort_behavior.md] +summary: Per-session adaptive-thinking state was replaced with a bounded LRU cache capped at 500 sessions, with regression coverage for eviction and type narrowing fixes. +tags: [] +title: Bounded Session State LRU Cache +updatedAt: '2026-04-25T17:44:36.487Z' +--- +## Reason +Capture the bounded per-session state change and its test coverage. + +## Raw Concept +**Task:** +Document bounded session state behavior and related regression coverage + +**Changes:** +- Replaced module-level Maps with bounded LRU-backed session state +- Added eviction regression test +- Fixed a typecheck issue by narrowing resolvedVariant before assignment + +**Files:** +- src/index.ts +- src/index.test.ts + +**Flow:** +session interaction -> resolve variant state -> store in LRU -> evict oldest entry when cap exceeded + +**Timestamp:** 2026-04-25 + +**Author:** assistant + +## Narrative +### Structure +The plugin previously kept state in three module-level Maps; it now uses a single bounded LRU cache to prevent growth in long-running processes. + +### Dependencies +Requires regression tests to preserve default behavior and eviction semantics while keeping the implementation type-safe. + +### Highlights +The cache is capped at 500 sessions and protects the process from unbounded memory growth. + +## Facts +- **session_state_storage**: Per-session state was replaced with a bounded LRU cache. [project] +- **session_state_lru_cap**: The LRU cache cap is 500 sessions. [project] +- **old_session_state_maps**: The old unbounded state used three module-level Maps: currentVariant, persistedVariant, and temporaryResetVariant. [project] +- **lru_eviction_regression_test**: A regression test verifies that the oldest session state is evicted after cache pressure. [project] +- **typecheck_fix**: A typecheck issue was fixed by narrowing resolvedVariant before assignment. [project] diff --git a/.brv/context-tree/facts/project/git_branch_checkout_safety.md b/.brv/context-tree/facts/project/git_branch_checkout_safety.md index dd833a9..31fb6af 100644 --- a/.brv/context-tree/facts/project/git_branch_checkout_safety.md +++ b/.brv/context-tree/facts/project/git_branch_checkout_safety.md @@ -1,10 +1,10 @@ --- -title: Git branch checkout safety +createdAt: '2026-04-25T12:25:59.254Z' +keywords: [] +related: [facts/project/git_stash_reapply_outcome.md] summary: Use Git refusal as a safety signal; stash conflicting local .brv changes with a clear label before switching branches and pulling updates. tags: [] -related: [] -keywords: [] -createdAt: '2026-04-25T12:25:59.254Z' +title: Git branch checkout safety updatedAt: '2026-04-25T12:25:59.254Z' --- ## Reason diff --git a/.brv/context-tree/facts/project/git_stash_reapply_outcome.md b/.brv/context-tree/facts/project/git_stash_reapply_outcome.md index 6be8384..bae5c67 100644 --- a/.brv/context-tree/facts/project/git_stash_reapply_outcome.md +++ b/.brv/context-tree/facts/project/git_stash_reapply_outcome.md @@ -1,10 +1,10 @@ --- -title: Git Stash Reapply Outcome +createdAt: '2026-04-25T12:27:24.819Z' +keywords: [] +related: [facts/project/git_branch_checkout_safety.md] summary: Reapplying stash on main restored .brv context-tree changes without dropping the stash; reasoning-effort state handling and medium handling files were restored, while git branch checkout safety file remained present. tags: [] -related: [] -keywords: [] -createdAt: '2026-04-25T12:27:24.819Z' +title: Git Stash Reapply Outcome updatedAt: '2026-04-25T12:27:24.819Z' --- ## Reason diff --git a/.brv/context-tree/facts/project/pr_push_outcome.md b/.brv/context-tree/facts/project/pr_push_outcome.md index ee732c1..04603a0 100644 --- a/.brv/context-tree/facts/project/pr_push_outcome.md +++ b/.brv/context-tree/facts/project/pr_push_outcome.md @@ -1,10 +1,10 @@ --- -title: PR Push Outcome +createdAt: '2026-04-25T13:12:20.630Z' +keywords: [] +related: [facts/project/reasoning_effort_medium_handling.md] summary: The remaining .brv memory was committed as 7edf357 and pushed; the PR branch is clean and up to date with origin/feat/configurable-plugin-options. tags: [] -related: [] -keywords: [] -createdAt: '2026-04-25T13:12:20.630Z' +title: PR Push Outcome updatedAt: '2026-04-25T13:12:20.630Z' --- ## Reason diff --git a/.brv/context-tree/facts/project/reasoning_effort_behavior.md b/.brv/context-tree/facts/project/reasoning_effort_behavior.md index 1c56464..4acd00f 100644 --- a/.brv/context-tree/facts/project/reasoning_effort_behavior.md +++ b/.brv/context-tree/facts/project/reasoning_effort_behavior.md @@ -1,18 +1,18 @@ --- title: Reasoning Effort Behavior -summary: Temporary low reasoning effort can be set in a live session, invalid levels are rejected, and the next idle transition should reset to medium once. +summary: Reasoning effort behavior now honors quiet invalid-config handling, ignores stale cached variants for the current model, and resolves the newest relevant agent; README and tests were updated and the suite passed. tags: [] -related: [] +related: [facts/preference/reasoning_effort.md, facts/project/reasoning_effort_confirmation.md, facts/project/reasoning_effort_reset_message.md, facts/project/reasoning_effort_reset_notice.md, facts/project/reasoning_effort_reset_notice_visibility.md, facts/project/reasoning_effort_reset_behavior.md, facts/project/reasoning_effort_state_handling.md, facts/project/reasoning_effort_medium_handling.md, facts/project/bounded_session_state_lru_cache.md, project_management/pull_requests/context.md] keywords: [] createdAt: '2026-04-25T11:53:01.433Z' -updatedAt: '2026-04-25T11:54:28.539Z' +updatedAt: '2026-04-26T10:57:08.718Z' --- ## Reason -Persist lasting knowledge about reasoning effort behavior, validation, and checks +Capture durable implementation and verification details from the conversation ## Raw Concept **Task:** -Document reasoning effort session behavior and verification outcomes +Document the reasoning effort behavior changes and verification outcomes **Changes:** - Split state into currentVariant, persistedVariant, and temporaryResetVariant @@ -27,36 +27,52 @@ Document reasoning effort session behavior and verification outcomes - Confirmed invalid reasoning effort level is rejected before mutation - Observed expected one-time idle reset behavior to medium - Verified tests, typecheck, lint, format:check, and build passed +- Identified quiet mode bug where invalid config still shows a toast. +- Noted build bundling is large and should externalize runtime dependencies. +- Observed cached variants should be validated against current model variants. +- Flagged fallback agent resolution overwriting agentName when scanning messages backward. +- Highlighted inconsistent error serialization across code paths. +- Outlined missing edge-case tests and README usability gaps. +- Considered configurable reset behavior for temporary effort handling. +- Called out module-level singleton state as a potential multi-instance risk. +- Honors quiet: true for invalid config +- Ignores stale cached reasoning effort for the current model +- Resolves fallback agent using the newest relevant agent +- Expanded regression tests and README documentation **Files:** - src/index.ts - src/index.test.ts +- README.md **Flow:** -set reasoning effort -> validate level -> run checks -> idle transition resets to medium once +add regression tests -> confirm failures -> apply minimal fixes -> expand README -> run verification suite -**Timestamp:** 2026-04-25T11:54:23.547Z +**Timestamp:** 2026-04-26T10:57:02.697Z **Author:** assistant ## Narrative ### Structure -This entry records a live-session reasoning-effort state change and the expected follow-up idle reset behavior. +The update spans production logic in src/index.ts, coverage in src/index.test.ts, and user-facing documentation in README.md. ### Dependencies -The behavior depends on the session state machine and validation for allowed reasoning effort levels. +The behavior depends on current model validity, cached reasoning state, and agent resolution order. ### Highlights -A temporary low setting was accepted, an invalid level was rejected, and the next idle transition should restore medium only once. +The work completed successfully after tests turned green, and the verification suite passed in full. ### Rules Temporary reasoning effort now resets only once on session.idle. Reset prompts are ignored and should not remain visible in-context. Invalid levels are rejected before calling promptAsync or mutating state. ### Examples -Checks that passed included pnpm run test, pnpm run typecheck, pnpm run lint, pnpm run format:check, and pnpm run build. +Examples mentioned include quiet invalid-config handling, stale cache invalidation, and newest-agent fallback resolution. ## Facts -- **reasoning_effort**: Reasoning effort was set to low in a live session. [project] -- **reasoning_effort_validation**: Invalid reasoning effort levels are rejected before mutation. [project] -- **reasoning_effort_reset_behavior**: The temporary low reasoning effort should reset to medium once on idle, then stop repeating. [project] -- **verification_status**: Automated checks passed: test, typecheck, lint, format:check, and build. [project] +- **reasoning_effort**: Reasoning effort was set to high [project] +- **quiet_invalid_config_behavior**: The implementation now honors quiet: true for invalid config to suppress toast while still logging [project] +- **stale_cached_variants**: Cached reasoning effort is ignored when it is invalid for the current model [project] +- **agent_fallback_resolution**: Fallback agent resolution uses the newest relevant agent [project] +- **test_coverage**: Regression tests were added for quiet config errors, stale cached variants, newest-agent fallback, provider lookup failure, and reset failure recovery [project] +- **verification_suite**: The project verification suite passed: format:check, lint, typecheck, test, and build [project] +- **test_results**: The test suite reported 15 passed [project] diff --git a/.brv/context-tree/facts/project/reasoning_effort_confirmation.md b/.brv/context-tree/facts/project/reasoning_effort_confirmation.md index 85aaaad..f48109f 100644 --- a/.brv/context-tree/facts/project/reasoning_effort_confirmation.md +++ b/.brv/context-tree/facts/project/reasoning_effort_confirmation.md @@ -1,10 +1,10 @@ --- -title: Reasoning Effort Confirmation +createdAt: '2026-04-25T11:06:39.753Z' +keywords: [] +related: [facts/preference/reasoning_effort.md, facts/project/reasoning_effort_reset_message.md, facts/project/reasoning_effort_reset_notice.md, facts/project/reasoning_effort_reset_notice_visibility.md, facts/project/reasoning_effort_reset_behavior.md, facts/project/reasoning_effort_behavior.md, facts/project/reasoning_effort_state_handling.md, facts/project/reasoning_effort_medium_handling.md] summary: The only visible confirmation after the tool call was "Reasoning effort set to low". tags: [] -related: [] -keywords: [] -createdAt: '2026-04-25T11:06:39.753Z' +title: Reasoning Effort Confirmation updatedAt: '2026-04-25T11:08:43.379Z' --- ## Reason diff --git a/.brv/context-tree/facts/project/reasoning_effort_medium_handling.md b/.brv/context-tree/facts/project/reasoning_effort_medium_handling.md index c4f5ae3..d90d2a3 100644 --- a/.brv/context-tree/facts/project/reasoning_effort_medium_handling.md +++ b/.brv/context-tree/facts/project/reasoning_effort_medium_handling.md @@ -1,10 +1,10 @@ --- -title: Reasoning Effort Medium Handling +createdAt: '2026-04-25T11:56:05.207Z' +keywords: [] +related: [facts/preference/reasoning_effort.md, facts/project/reasoning_effort_confirmation.md, facts/project/reasoning_effort_reset_message.md, facts/project/reasoning_effort_reset_notice.md, facts/project/reasoning_effort_reset_notice_visibility.md, facts/project/reasoning_effort_reset_behavior.md, facts/project/reasoning_effort_behavior.md, facts/project/reasoning_effort_state_handling.md, facts/project/pr_push_outcome.md] summary: Reasoning effort was set to medium, a patch changeset was added for opencode-adaptive-thinking, and formatting, lint, test, and typecheck all passed before committing and pushing only the changeset. tags: [] -related: [] -keywords: [] -createdAt: '2026-04-25T11:56:05.207Z' +title: Reasoning Effort Medium Handling updatedAt: '2026-04-25T12:17:35.362Z' --- ## Reason diff --git a/.brv/context-tree/facts/project/reasoning_effort_reset_behavior.md b/.brv/context-tree/facts/project/reasoning_effort_reset_behavior.md index b35733c..ad6393f 100644 --- a/.brv/context-tree/facts/project/reasoning_effort_reset_behavior.md +++ b/.brv/context-tree/facts/project/reasoning_effort_reset_behavior.md @@ -1,10 +1,10 @@ --- -title: Reasoning Effort Reset Behavior +createdAt: '2026-04-25T11:09:11.082Z' +keywords: [] +related: [facts/preference/reasoning_effort.md, facts/project/reasoning_effort_confirmation.md, facts/project/reasoning_effort_reset_message.md, facts/project/reasoning_effort_reset_notice.md, facts/project/reasoning_effort_reset_notice_visibility.md, facts/project/reasoning_effort_behavior.md, facts/project/reasoning_effort_state_handling.md, facts/project/reasoning_effort_medium_handling.md] summary: Reasoning effort can be reset to medium, and the reset notice states that it has been reset to medium. tags: [] -related: [] -keywords: [] -createdAt: '2026-04-25T11:09:11.082Z' +title: Reasoning Effort Reset Behavior updatedAt: '2026-04-25T11:54:47.414Z' --- ## Reason diff --git a/.brv/context-tree/facts/project/reasoning_effort_reset_message.md b/.brv/context-tree/facts/project/reasoning_effort_reset_message.md index 137c963..f0066d6 100644 --- a/.brv/context-tree/facts/project/reasoning_effort_reset_message.md +++ b/.brv/context-tree/facts/project/reasoning_effort_reset_message.md @@ -1,10 +1,10 @@ --- -title: Reasoning Effort Reset Message +createdAt: '2026-04-25T11:08:33.219Z' +keywords: [] +related: [facts/preference/reasoning_effort.md, facts/project/reasoning_effort_confirmation.md, facts/project/reasoning_effort_reset_notice.md, facts/project/reasoning_effort_reset_notice_visibility.md, facts/project/reasoning_effort_reset_behavior.md, facts/project/reasoning_effort_behavior.md, facts/project/reasoning_effort_state_handling.md, facts/project/reasoning_effort_medium_handling.md] summary: Reasoning effort was reset to medium, with no separate tool-generated reset confirmation observed beyond an earlier low setting message. tags: [] -related: [] -keywords: [] -createdAt: '2026-04-25T11:08:33.219Z' +title: Reasoning Effort Reset Message updatedAt: '2026-04-25T11:11:38.940Z' --- ## Reason diff --git a/.brv/context-tree/facts/project/reasoning_effort_reset_notice.md b/.brv/context-tree/facts/project/reasoning_effort_reset_notice.md index a752a43..6ca64ab 100644 --- a/.brv/context-tree/facts/project/reasoning_effort_reset_notice.md +++ b/.brv/context-tree/facts/project/reasoning_effort_reset_notice.md @@ -1,10 +1,10 @@ --- -title: Reasoning Effort Reset Notice +createdAt: '2026-04-25T11:44:48.223Z' +keywords: [] +related: [facts/preference/reasoning_effort.md, facts/project/reasoning_effort_confirmation.md, facts/project/reasoning_effort_reset_message.md, facts/project/reasoning_effort_reset_notice_visibility.md, facts/project/reasoning_effort_reset_behavior.md, facts/project/reasoning_effort_behavior.md, facts/project/reasoning_effort_state_handling.md, facts/project/reasoning_effort_medium_handling.md] summary: Reasoning effort reset notice is visible and states that reasoning effort reset to medium. tags: [] -related: [] -keywords: [] -createdAt: '2026-04-25T11:44:48.223Z' +title: Reasoning Effort Reset Notice updatedAt: '2026-04-25T11:44:48.223Z' --- ## Reason diff --git a/.brv/context-tree/facts/project/reasoning_effort_reset_notice_visibility.md b/.brv/context-tree/facts/project/reasoning_effort_reset_notice_visibility.md index 888de52..e49b8a2 100644 --- a/.brv/context-tree/facts/project/reasoning_effort_reset_notice_visibility.md +++ b/.brv/context-tree/facts/project/reasoning_effort_reset_notice_visibility.md @@ -1,10 +1,10 @@ --- -title: Reasoning Effort Reset Notice Visibility +createdAt: '2026-04-25T11:12:05.181Z' +keywords: [] +related: [facts/preference/reasoning_effort.md, facts/project/reasoning_effort_confirmation.md, facts/project/reasoning_effort_reset_message.md, facts/project/reasoning_effort_reset_notice.md, facts/project/reasoning_effort_reset_behavior.md, facts/project/reasoning_effort_behavior.md, facts/project/reasoning_effort_state_handling.md, facts/project/reasoning_effort_medium_handling.md] summary: The reset notice is visible as a user-level message rather than a separate tool confirmation. tags: [] -related: [] -keywords: [] -createdAt: '2026-04-25T11:12:05.181Z' +title: Reasoning Effort Reset Notice Visibility updatedAt: '2026-04-25T11:12:05.181Z' --- ## Reason diff --git a/.brv/context-tree/facts/project/reasoning_effort_state_handling.md b/.brv/context-tree/facts/project/reasoning_effort_state_handling.md index 0e63548..aa082d2 100644 --- a/.brv/context-tree/facts/project/reasoning_effort_state_handling.md +++ b/.brv/context-tree/facts/project/reasoning_effort_state_handling.md @@ -1,10 +1,10 @@ --- -title: Reasoning Effort State Handling +createdAt: '2026-04-25T11:48:50.291Z' +keywords: [] +related: [facts/preference/reasoning_effort.md, facts/project/reasoning_effort_confirmation.md, facts/project/reasoning_effort_reset_message.md, facts/project/reasoning_effort_reset_notice.md, facts/project/reasoning_effort_reset_notice_visibility.md, facts/project/reasoning_effort_reset_behavior.md, facts/project/reasoning_effort_behavior.md, facts/project/reasoning_effort_medium_handling.md, facts/project/bounded_session_state_lru_cache.md] summary: SDK types were restored in src/index.ts, the PR title was changed to conventional commit style, and verification passed. tags: [] -related: [] -keywords: [] -createdAt: '2026-04-25T11:48:50.291Z' +title: Reasoning Effort State Handling updatedAt: '2026-04-25T12:13:21.426Z' --- ## Reason diff --git a/.brv/context-tree/project_management/pull_requests/context.md b/.brv/context-tree/project_management/pull_requests/context.md index ca3856c..02ca5b1 100644 --- a/.brv/context-tree/project_management/pull_requests/context.md +++ b/.brv/context-tree/project_management/pull_requests/context.md @@ -1,3 +1,6 @@ +--- +related: [project_management/pull_requests/pr_317_plugin_entry_added.md, project_management/pull_requests/contract_parity_matrix_review.md, project_management/pull_requests/pr_3_plugin_configurable_options.md, project_management/pull_requests/pr_3_test_pruning.md, project_management/pull_requests/pr_5_default_plugin_options_follow_up.md, project_management/pull_requests/pr_6_replacement_for_default_options_changes.md, project_management/pull_requests/pr_6_merged_and_release_created.abstract.md, project_management/pull_requests/pr_6_title_change.abstract.md] +--- # Topic: pull_requests ## Overview diff --git a/.brv/context-tree/project_management/pull_requests/contract_parity_matrix_review.md b/.brv/context-tree/project_management/pull_requests/contract_parity_matrix_review.md new file mode 100644 index 0000000..1492239 --- /dev/null +++ b/.brv/context-tree/project_management/pull_requests/contract_parity_matrix_review.md @@ -0,0 +1,52 @@ +--- +createdAt: '2026-04-25T18:42:43.537Z' +keywords: [] +related: [project_management/pull_requests/contract_parity_matrix_review.abstract.md, project_management/pull_requests/contract_parity_matrix_review.overview.md, project_management/pull_requests/context.md, project_management/pull_requests/pr_317_plugin_entry_added.md, project_management/pull_requests/pr_3_plugin_configurable_options.md, project_management/pull_requests/pr_3_test_pruning.md, project_management/pull_requests/pr_5_default_plugin_options_follow_up.md, project_management/pull_requests/pr_6_replacement_for_default_options_changes.md, project_management/pull_requests/pr_6_merged_and_release_created.abstract.md, project_management/pull_requests/pr_6_title_change.abstract.md] +summary: Review found the contract parity matrix test suite passed but was too small to prove full 3x3 closure, and native Anthropic/Google streaming parity remained incomplete. +tags: [] +title: Contract Parity Matrix Review +updatedAt: '2026-04-25T18:42:43.537Z' +--- +## Reason +Capture durable review findings about test matrix coverage and streaming grammar parity + +## Raw Concept +**Task:** +Document the review outcome for the contract parity matrix and upstream streaming parity work + +**Changes:** +- Reviewed contract parity matrix test coverage +- Identified incomplete Anthropic native streaming grammar decoding +- Identified incomplete Google native streaming event decoding + +**Flow:** +run matrix tests -> inspect coverage -> compare against approved plan -> record compliance verdict and residual risks + +**Timestamp:** 2026-04-25 + +**Author:** assistant + +## Narrative +### Structure +The review centered on the contract_parity_matrix test file and upstream streaming decoders, with the approved implementation plan used as the compliance target. + +### Dependencies +Compliance depended on full 3x3 matrix coverage, richer canonical streaming event decoding for Anthropic and Google, and avoiding bogus empty Google terminal chunks. + +### Highlights +The test command passed with 6 tests, but the suite did not prove the full matrix closure required by the plan. Native streaming parity for Anthropic and Google remained incomplete. + +### Rules +Verdict: NOT_COMPLIANT + +### Examples +Residual risk noted: cargo test -p commissary-api --test contract_parity_matrix passed, but the suite was too narrow to prove plan compliance. + +## Facts +- **git_branch**: current git branch is main [project] +- **working_directory**: The working directory changed to /home/ianpascoe/code/opencode-adaptive-thinking [project] +- **contract_parity_matrix_test_result**: cargo test -p commissary-api --test contract_parity_matrix passed with 6 tests [project] +- **matrix_coverage**: The contract parity matrix suite was too small to prove the plan-required full 3x3 closure [project] +- **anthropic_stream_grammar**: Anthropic native stream decoding did not preserve the full block grammar [project] +- **google_stream_grammar**: Google native streaming decoding only emitted text, usage, and terminal events [project] +- **google_terminal_frame_parts**: The Google stream frame emitted a terminal frame with parts set to an empty array [project] diff --git a/.brv/context-tree/project_management/pull_requests/pr_24458_compliance_fix.md b/.brv/context-tree/project_management/pull_requests/pr_24458_compliance_fix.md new file mode 100644 index 0000000..99e5640 --- /dev/null +++ b/.brv/context-tree/project_management/pull_requests/pr_24458_compliance_fix.md @@ -0,0 +1,56 @@ +--- +title: PR 24458 Compliance Fix +summary: 'PR 24458 was updated to the required template format, kept Closes #24457, cleared the needs:compliance label, and passed compliance checks.' +tags: [] +related: [project_management/pull_requests/pr_24458_ecosystem_plugin_addition.md, project_management/pull_requests/pr_6_merged_and_release_created.overview.md] +keywords: [] +createdAt: '2026-04-26T10:03:05.398Z' +updatedAt: '2026-04-26T10:03:05.398Z' +--- +## Reason +Documenting the resolved compliance issue for PR 24458 and linked issue 24457 + +## Raw Concept +**Task:** +Fix compliance issues for issue 24457 and pull request 24458 + +**Changes:** +- Updated the PR description to match the repository PR template +- Preserved the issue linkage with Closes #24457 +- Removed the needs:compliance label after compliance approval +- Verified passing compliance-related checks + +**Files:** +- https://github.com/anomalyco/opencode/pull/24458 +- https://github.com/anomalyco/opencode/issues/24457 + +**Flow:** +detect compliance failure -> update PR body to template -> confirm bot approval -> remove compliance label -> verify checks + +**Timestamp:** 2026-04-26 + +**Author:** assistant + +## Narrative +### Structure +The work centered on a single PR compliance correction for PR 24458, which was linked to issue 24457. + +### Dependencies +Compliance depended on matching the repository PR template and satisfying the contributing guidelines checked by the bot. + +### Highlights +The fix resolved the compliance flag, retained the issue closure link, and left the PR in a passing state with compliance checks green. + +### Rules +The PR description must use the required PR template format. + +### Examples +Example outcome: compliance bot confirmed “It now meets our contributing guidelines.” + +## Facts +- **pr_24458_compliance_flag**: PR 24458 was flagged with needs:compliance because the description did not use the required PR template. [project] +- **pr_template_used**: The PR description was updated to match .github/pull_request_template.md. [project] +- **linked_issue**: Closes #24457 was kept linked in the PR. [project] +- **compliance_bot_result**: The compliance bot confirmed that the PR now meets the contributing guidelines. [project] +- **compliance_label_state**: The needs:compliance label was removed after the fix. [project] +- **compliance_checks**: check-compliance and check-standards passed after the update. [project] diff --git a/.brv/context-tree/project_management/pull_requests/pr_24458_ecosystem_plugin_addition.md b/.brv/context-tree/project_management/pull_requests/pr_24458_ecosystem_plugin_addition.md new file mode 100644 index 0000000..210be9b --- /dev/null +++ b/.brv/context-tree/project_management/pull_requests/pr_24458_ecosystem_plugin_addition.md @@ -0,0 +1,37 @@ +--- +title: PR 24458 Ecosystem Plugin Addition +summary: PR 24458 added opencode-adaptive-thinking to the ecosystem docs plugin table and passed prettier and diff checks. +tags: [] +related: [] +keywords: [] +createdAt: '2026-04-26T09:50:29.055Z' +updatedAt: '2026-04-26T09:50:29.055Z' +--- +## Reason +Document the completed docs change and validation for adding the plugin entry. + +## Raw Concept +**Task:** +Document the ecosystem docs update for the opencode-adaptive-thinking plugin + +**Changes:** +- Created tracking issue 24457 +- Opened PR 24458 +- Added opencode-adaptive-thinking to packages/web/src/content/docs/ecosystem.mdx under Plugins +- Validation passed with bunx prettier --check and git diff --check + +**Flow:** +locate docs repo -> create issue -> open branch/PR -> edit ecosystem docs -> validate formatting and diff + +## Narrative +### Structure +A single plugin-table row was added to the ecosystem docs page in packages/web/src/content/docs/ecosystem.mdx. + +### Dependencies +The update depended on the upstream opencode repository and the docs contribution workflow. + +### Highlights +The plugin was added under Plugins, and both formatting and diff validation succeeded. + +### Examples +Issue 24457 tracks the change; PR 24458 contains the docs update. diff --git a/.brv/context-tree/project_management/pull_requests/pr_317_plugin_entry_added.md b/.brv/context-tree/project_management/pull_requests/pr_317_plugin_entry_added.md new file mode 100644 index 0000000..a476cad --- /dev/null +++ b/.brv/context-tree/project_management/pull_requests/pr_317_plugin_entry_added.md @@ -0,0 +1,46 @@ +--- +createdAt: '2026-04-26T09:22:13.684Z' +keywords: [] +related: [project_management/pull_requests/pr_317_plugin_entry_added.abstract.md, project_management/pull_requests/pr_317_plugin_entry_added.overview.md, project_management/pull_requests/context.md, project_management/pull_requests/contract_parity_matrix_review.md, project_management/pull_requests/pr_3_plugin_configurable_options.md, project_management/pull_requests/pr_3_test_pruning.md, project_management/pull_requests/pr_5_default_plugin_options_follow_up.md, project_management/pull_requests/pr_6_replacement_for_default_options_changes.md, project_management/pull_requests/pr_6_merged_and_release_created.abstract.md, project_management/pull_requests/pr_6_title_change.abstract.md] +summary: Opened PR 317 for opencode-adaptive-thinking; added one YAML plugin entry, validation passed, and the PR targets awesome-opencode:main +tags: [] +title: PR 317 Plugin Entry Added +updatedAt: '2026-04-26T09:22:13.684Z' +--- +## Reason +Record the successful awesome-list contribution and validation outcome + +## Raw Concept +**Task:** +Document the PR work for contributing the opencode-adaptive-thinking plugin to awesome-opencode + +**Changes:** +- Created a minimal validated plugin entry at data/plugins/opencode-adaptive-thinking.yaml +- Pushed the branch to the fork and opened PR 317 +- Confirmed the contribution workflow targets awesome-opencode:main + +**Flow:** +inspect metadata -> branch from upstream/main -> add YAML plugin entry -> validate -> push -> open PR + +**Timestamp:** 2026-04-26T09:22:07.428Z + +**Author:** assistant + +## Narrative +### Structure +The work was performed in a local fork checkout of awesome-opencode, using a single YAML file under data/plugins/ as the contribution unit. The branch was kept focused to one commit and no direct README.md edit was needed because README generation is handled by the repository workflow. + +### Dependencies +Required the awesome-list contribution format and local validation with npm run validate before opening the PR. + +### Highlights +The PR was opened successfully as pull request 317, validation passed, and the contribution was kept minimal and isolated to the plugin YAML entry. + +## Facts +- **reasoning_effort**: Reasoning effort was set to high [preference] +- **fork_checkout_path**: A local fork checkout already existed at /Users/ianpascoe/code/awesome-opencode [project] +- **awesome_list_contribution_format**: The contribution format uses one YAML file under data/plugins/ and does not require a direct README.md edit [project] +- **validation_status**: The added plugin entry validated locally with npm run validate [project] +- **pull_request_url**: Opened PR https://github.com/awesome-opencode/awesome-opencode/pull/317 [project] +- **pull_request_target**: The PR targets awesome-opencode:main [project] +- **commit_scope**: The branch contained one focused commit adding only data/plugins/opencode-adaptive-thinking.yaml [project] diff --git a/.brv/context-tree/project_management/pull_requests/pr_3_plugin_configurable_options.md b/.brv/context-tree/project_management/pull_requests/pr_3_plugin_configurable_options.md index f285ca9..bc9dc46 100644 --- a/.brv/context-tree/project_management/pull_requests/pr_3_plugin_configurable_options.md +++ b/.brv/context-tree/project_management/pull_requests/pr_3_plugin_configurable_options.md @@ -1,10 +1,10 @@ --- -title: PR 3 Plugin Configurable Options +createdAt: '2026-04-25T13:00:09.453Z' +keywords: [] +related: [architecture/plugin_options/plugin_options_configurability.md, project_management/pull_requests/context.md, project_management/pull_requests/pr_3_plugin_configurable_options.abstract.md, project_management/pull_requests/pr_3_plugin_configurable_options.overview.md, project_management/pull_requests/pr_317_plugin_entry_added.md, project_management/pull_requests/contract_parity_matrix_review.md, project_management/pull_requests/pr_3_test_pruning.md, project_management/pull_requests/pr_5_default_plugin_options_follow_up.md, project_management/pull_requests/pr_6_replacement_for_default_options_changes.md, project_management/pull_requests/pr_6_merged_and_release_created.abstract.md, project_management/pull_requests/pr_6_title_change.abstract.md] summary: PR 3 removed the public serviceName plugin option, kept the internal log service name fixed, and added a regression test plus docs updates. tags: [] -related: [architecture/plugin_options/plugin_options_configurability.md, project_management/pull_requests/context.md] -keywords: [] -createdAt: '2026-04-25T13:00:09.453Z' +title: PR 3 Plugin Configurable Options updatedAt: '2026-04-25T13:05:54.310Z' --- ## Reason diff --git a/.brv/context-tree/project_management/pull_requests/pr_3_test_pruning.md b/.brv/context-tree/project_management/pull_requests/pr_3_test_pruning.md index fd8c43b..ef703eb 100644 --- a/.brv/context-tree/project_management/pull_requests/pr_3_test_pruning.md +++ b/.brv/context-tree/project_management/pull_requests/pr_3_test_pruning.md @@ -1,10 +1,10 @@ --- -title: PR 3 Test Pruning +createdAt: '2026-04-25T13:08:52.626Z' +keywords: [] +related: [project_management/pull_requests/context.md, src/index.test.ts.md, project_management/pull_requests/pr_3_test_pruning.abstract.md, project_management/pull_requests/pr_3_test_pruning.overview.md, project_management/pull_requests/pr_317_plugin_entry_added.md, project_management/pull_requests/contract_parity_matrix_review.md, project_management/pull_requests/pr_3_plugin_configurable_options.md, project_management/pull_requests/pr_5_default_plugin_options_follow_up.md, project_management/pull_requests/pr_6_replacement_for_default_options_changes.md, project_management/pull_requests/pr_6_merged_and_release_created.abstract.md, project_management/pull_requests/pr_6_title_change.abstract.md] summary: PR 3 removed two low-signal system-transform smoke tests, kept behavior-focused coverage, and passed validation checks. tags: [] -related: [project_management/pull_requests/context.md, src/index.test.ts.md] -keywords: [] -createdAt: '2026-04-25T13:08:52.626Z' +title: PR 3 Test Pruning updatedAt: '2026-04-25T13:08:52.626Z' --- ## Reason diff --git a/.brv/context-tree/project_management/pull_requests/pr_5_default_plugin_options_follow_up.md b/.brv/context-tree/project_management/pull_requests/pr_5_default_plugin_options_follow_up.md index 48d55e9..3e36e77 100644 --- a/.brv/context-tree/project_management/pull_requests/pr_5_default_plugin_options_follow_up.md +++ b/.brv/context-tree/project_management/pull_requests/pr_5_default_plugin_options_follow_up.md @@ -1,10 +1,10 @@ --- -title: PR 5 Default Plugin Options Follow-up +createdAt: '2026-04-25T14:19:09.928Z' +keywords: [] +related: [project_management/pull_requests/pr_3_plugin_configurable_options.md, project_management/pull_requests/pr_3_test_pruning.md, project_management/pull_requests/pr_5_default_plugin_options_follow_up.abstract.md, project_management/pull_requests/pr_5_default_plugin_options_follow_up.overview.md, project_management/pull_requests/context.md, project_management/pull_requests/pr_317_plugin_entry_added.md, project_management/pull_requests/contract_parity_matrix_review.md, project_management/pull_requests/pr_6_replacement_for_default_options_changes.md, project_management/pull_requests/pr_6_merged_and_release_created.abstract.md, project_management/pull_requests/pr_6_title_change.abstract.md] summary: 'PR #5 was opened from latest main to preserve default plugin options behavior when no options are provided; verification passed on test, typecheck, lint, format:check, and build.' tags: [] -related: [project_management/pull_requests/pr_3_plugin_configurable_options.md, project_management/pull_requests/pr_3_test_pruning.md] -keywords: [] -createdAt: '2026-04-25T14:19:09.928Z' +title: PR 5 Default Plugin Options Follow-up updatedAt: '2026-04-25T14:19:09.928Z' --- ## Reason diff --git a/.brv/context-tree/project_management/pull_requests/pr_6_replacement_for_default_options_changes.md b/.brv/context-tree/project_management/pull_requests/pr_6_replacement_for_default_options_changes.md index f3d6b59..ce7fc04 100644 --- a/.brv/context-tree/project_management/pull_requests/pr_6_replacement_for_default_options_changes.md +++ b/.brv/context-tree/project_management/pull_requests/pr_6_replacement_for_default_options_changes.md @@ -1,10 +1,10 @@ --- -title: PR 6 replacement for default-options changes +createdAt: '2026-04-25T14:21:30.945Z' +keywords: [] +related: [project_management/pull_requests/pr_5_default_plugin_options_follow_up.md, project_management/pull_requests/pr_6_replacement_for_default_options_changes.abstract.md, project_management/pull_requests/pr_6_replacement_for_default_options_changes.overview.md, project_management/pull_requests/context.md, project_management/pull_requests/pr_317_plugin_entry_added.md, project_management/pull_requests/contract_parity_matrix_review.md, project_management/pull_requests/pr_3_plugin_configurable_options.md, project_management/pull_requests/pr_3_test_pruning.md, project_management/pull_requests/pr_6_merged_and_release_created.abstract.md, project_management/pull_requests/pr_6_title_change.abstract.md] summary: 'PR #6 replaced superseded PR #5 after rebuilding default-options changes from latest main on feat/default-options-regression; verification passed and PR #5 was closed.' tags: [] -related: [project_management/pull_requests/pr_5_default_plugin_options_follow_up.md] -keywords: [] -createdAt: '2026-04-25T14:21:30.945Z' +title: PR 6 replacement for default-options changes updatedAt: '2026-04-25T14:21:30.945Z' --- ## Reason From 22bd57f3318d36ed0b054a44ded8a12d863ede44 Mon Sep 17 00:00:00 2001 From: Ian Pascoe Date: Sun, 26 Apr 2026 07:00:45 -0400 Subject: [PATCH 3/3] chore: add reasoning effort changeset --- .changeset/harden-reasoning-effort.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/harden-reasoning-effort.md diff --git a/.changeset/harden-reasoning-effort.md b/.changeset/harden-reasoning-effort.md new file mode 100644 index 0000000..72bec9c --- /dev/null +++ b/.changeset/harden-reasoning-effort.md @@ -0,0 +1,5 @@ +--- +"opencode-adaptive-thinking": patch +--- + +Honor quiet invalid-config handling, ignore stale cached reasoning effort after model changes, and resolve fallback agent variants from the newest relevant message.