Repository navigation
fix: forward OMP developer messages to Claude - #9
LaurensBosscher wants to merge 4 commits into
Conversation
Deep @oh-my-pi/* imports fail under OMP 18.2.5 extension loading because host onLoad only rewrites legacy scopes onto in-process shims. Switch to @earendil-works root imports (proven on this host) and register claude-opus-5 so existing modelRoles/fallbackChains keep resolving.
…, Fable 5.1, Mythos) + max effort Derive the picker from the host's anthropic catalog instead of a hardcoded id list, keeping the 1M/200K variant entries. Measured [1m] entitlements stay in tables; unmeasured 1M-capable models default to 200K with a -1m alternate. Map thinking levels onto each model's catalog effort ladder (adds max). Fix unsuffixed entries throwing when their preferred window has no runtime.
OMP 18 ends some turns with developer messages (subagent reminders, synthetic continues). The bridge only read user messages, so it replaced them with "[continue]" and dropped them from rebuilt history. Treat them as user turns, matching OMP's anthropic provider; empty ones are skipped.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 98db92a1a6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const allResults = activeQueryContexts.size > 0 ? extractAllToolResults(context) : []; | ||
| const resultCtx = allResults.length > 0 ? contextForToolResults(allResults) : undefined; | ||
| const isReentrantUserQuery = activeQuery && lastMsgRole === "user" && allResults.length === 0; | ||
| const isReentrantUserQuery = activeQuery && lastMsgRole != null && isPromptRole(lastMsgRole) && allResults.length === 0; |
There was a problem hiding this comment.
Defer developer prompts that accompany tool results
When OMP appends a non-empty developer reminder or synthetic continue in the same provider callback as a tool result, allResults.length > 0 routes into resultCtx; that branch still checks only lastMsgRole === "user" before filling deferredUserMessages (lines 1139-1144), then advances the session cursor and returns. The developer instruction is therefore neither replayed nor imported, so reminders such as the tested call yield instruction are silently lost on tool-running turns; use isPromptRole in that defer path as well.
Useful? React with 👍 / 👎.
| function extractUserPrompt(messages: Context["messages"]): string | null { | ||
| const last = messages[messages.length - 1]; | ||
| if (!last || last.role !== "user") return null; | ||
| if (!last || !isPromptRole(last.role)) return null; |
There was a problem hiding this comment.
Skip empty developer turns before starting a query
When a provider invocation ends in a developer message whose content is whitespace or a textless array (cases this commit explicitly drops during convertPiMessages), this predicate admits it, extractUserPrompt returns "", and the fresh-query guard at lines 1195-1206 substitutes "[continue]". Thus an empty developer placeholder starts an unintended Claude turn (and under an active query can spawn a reentrant turn) instead of being skipped; apply the same non-empty check before classifying or extracting live prompts.
Useful? React with 👍 / 👎.
Changes
Stacked after #8: this branch includes earlier commits until their PRs merge.
Verification