fix(workboard): record resolved runtime metadata instead of hardcoded codex engine#108887
Conversation
… codex engine
Workboard executions labeled every dispatched run engine=codex, model=default,
and id suffix :codex even for Claude/other harness agents. The gateway agent
admission phase now returns the resolved {harness, provider, model} for plugin
subagent runs; the dispatcher records it verbatim and omits engine/model when
unresolved. Engine becomes an open runtime identifier in the workboard
contract (built-in launch choices stay a closed list), store/UI normalizers
preserve historical labels as written instead of inventing codex, and new
execution ids use an :agent-session suffix. Fixes #108362
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0408d71cc7
ℹ️ 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".
| provider: effectiveProviderOverride ?? sessionModel.provider, | ||
| model: sessionModel.model, | ||
| }; |
There was a problem hiding this comment.
Resolve runtime after channel model selection
For plugin subagent runs without an explicit model override, this reports the session/default provider and model before the command's model-selection pipeline runs. I checked src/agents/command/model-selection.ts:235-269: channels.modelByChannel can still replace the provider/model from the session entry or run context, and src/agents/command/run-embedded-attempt.ts:308-311 observes the actual attempt later. In a channel-backed subagent session with a channel model override, Workboard will persist the default runtime while the run executes the channel-selected model, recreating false audit metadata.
Useful? React with 👍 / 👎.
| ...(params.resolvedSessionKey === "global" ? { agentId: params.activeSessionAgentId } : {}), | ||
| status: "accepted" as const, | ||
| acceptedAt: Date.now(), | ||
| ...(taskTrackingMode === "plugin_subagent" ? { runtime: resolvedRuntime } : {}), |
There was a problem hiding this comment.
Preserve runtime on idempotent cached starts
This adds runtime to the accepted payload, but idempotent repeats of the same plugin subagent start hit the preflight dedupe path in src/gateway/server-methods/agent-request-preflight.ts:166-190, which reconstructs an in_flight response with only run/session/agent fields and drops cached.payload.runtime. A plugin retrying a start after the first accepted response will therefore get { runId } with no runtime, so callers like Workboard omit the engine/model even though the original accepted payload had it.
Useful? React with 👍 / 👎.
|
Merged via squash.
|
… codex engine (openclaw#108887) * fix(workboard): record resolved runtime metadata instead of hardcoded codex engine Workboard executions labeled every dispatched run engine=codex, model=default, and id suffix :codex even for Claude/other harness agents. The gateway agent admission phase now returns the resolved {harness, provider, model} for plugin subagent runs; the dispatcher records it verbatim and omits engine/model when unresolved. Engine becomes an open runtime identifier in the workboard contract (built-in launch choices stay a closed list), store/UI normalizers preserve historical labels as written instead of inventing codex, and new execution ids use an :agent-session suffix. Fixes openclaw#108362 * fix(workboard): accept undefined engine in ui engineModel helper
What Problem This Solves
Workboard recorded every dispatched agent session as
engine: codex,model: default, with an execution id ending:codex— even when the assigned agent actually ran Anthropic Claude via claude-cli. Operators auditing workboard cards saw Codex executions that never happened. (#108362)Why This Change Was Made
Execution metadata was fabricated at dispatch time before runtime resolution. The fix carries the prepared fact forward from the owning seam instead of re-deriving or guessing in the plugin:
{harness, provider, model}for plugin-subagent runs (same resolution the run itself uses: session override → model policy → implicit routing) and returns it on the run-start payload; the gateway subagent runtime exposes it as an optional, normalizedruntimeonSubagentRunResult(additive Plugin SDK surface; surface gate green).engine/modelentirely when unresolved — unknown is never labeledcodex. New execution ids use an:agent-sessionsuffix instead of encoding an engine name; existing persisted ids are untouched.WorkboardExecutionEnginebecomes an open runtime identifier in the contract (WORKBOARD_EXECUTION_ENGINESremains only the built-in launch-choice list); store and UI normalizers preserve historical labels as written — old rows minted by the bug cannot be safely reinterpreted, so they are neither rewritten nor re-defaulted (decision recorded in a code comment).User Impact
Workboard cards now show the engine/model that actually ran (e.g.
claude-cli+anthropic/claude-opus-4-8), or no engine claim at all — never a falsecodex/defaultlabel.Evidence
pnpm plugin-sdk:surface:checkgreen (additive optional field only).Fixes #108362