Skip to content

fix(skills): preserve scoped models across async continuations - #26

Closed
guustavomv wants to merge 5 commits into
verbeux-ai:mainfrom
guustavomv:fix/adaptive-plan-execution
Closed

guustavomv wants to merge 5 commits into
verbeux-ai:mainfrom
guustavomv:fix/adaptive-plan-execution

Conversation

@guustavomv

@guustavomv guustavomv commented Aug 8, 2026

Copy link
Copy Markdown

Motivation

Custom planning skills can lose their declared model after a background-agent completion notification: an initial /plan request begins on gpt-5.6-sol, while a queued continuation falls back to the session model. A separate production failure affected OpenAI-compatible tool calling: the configured max/deepseek-v4-pro execution coordinator repeatedly emitted Rea instead of Read, burning calls before falling back to Bash.

Changes

  • Persist skill effort in the inline command_permissions attachment.
  • Recover the latest skill model, effort, and allowed tools for task-notification continuations.
  • End inherited skill scope after a later visible user prompt.
  • Assemble streamed function-name fragments such as Rea + d before tool finalization.
  • Recover an unambiguous truncated built-in tool name, including after a filtered execution path omits its original definition. MCP names and ambiguous/short prefixes are never guessed.
  • Apply the same recovery to streaming and non-streaming tool execution paths.
  • Add regressions for model-scope continuation, split tool names, and safe prefix recovery.

Reproduction evidence

From an interactive /execute session with --debug-file:

  • The session UI displayed max/minimax-m3, but the effective skill API calls were provider: openai, model: max/deepseek-v4-pro.
  • Before the fix, debug logged repeated Unknown tool Rea entries, and the transcript contained repeated Error: No such tool available: Rea results.
  • The model then abandoned Read and used Bash, which succeeded. This isolated the failure to tool-name handling rather than repository access or permissions.

The companion orchestration-pack mitigation is published separately in guustavomv/verboo-orchestration-pack commit 5bc7e20: /execute no longer exposes Read and instructs the coordinator to read contracts using read-only Bash commands. A later /execute run made only Bash calls and showed no new Unknown tool Rea errors.

Planning bundles intentionally remain outside the harness configuration directory at /.plans/ through orchestration-pack commit f726c17; no special permission exception is included in this PR.

Validation

  • bun test src/Tool.test.ts src/services/tools/StreamingToolExecutor.toolPairing.test.ts src/services/api/openaiShim.test.ts src/utils/processUserInput/activeSkillScope.test.ts: 122 passed, 0 failed.
  • bun run build: CLI and SDK bundles built and validated.
  • GitHub PR checks: smoke, unit, provider, Python, web, and intent checks passed for the prior head; the current revert commit is pushed and awaiting its PR checks.

The repository-wide tsc --noEmit still reports the existing upstream baseline of unrelated missing modules/type errors; the touched production paths introduce no new targeted errors.

@guustavomv
guustavomv marked this pull request as draft August 8, 2026 20:30
@guustavomv guustavomv closed this Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant