Skip to content

fix(workboard): record resolved runtime metadata instead of hardcoded codex engine#108887

Merged
steipete merged 2 commits into
mainfrom
claude/codex-round-c
Jul 16, 2026
Merged

fix(workboard): record resolved runtime metadata instead of hardcoded codex engine#108887
steipete merged 2 commits into
mainfrom
claude/codex-round-c

Conversation

@steipete

Copy link
Copy Markdown
Contributor

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:

  • The gateway agent admission phase resolves {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, normalized runtime on SubagentRunResult (additive Plugin SDK surface; surface gate green).
  • The workboard dispatcher records the resolved runtime verbatim and omits engine/model entirely when unresolved — unknown is never labeled codex. New execution ids use an :agent-session suffix instead of encoding an engine name; existing persisted ids are untouched.
  • WorkboardExecutionEngine becomes an open runtime identifier in the contract (WORKBOARD_EXECUTION_ENGINES remains 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 false codex/default label.

Evidence

  • New/updated tests: dispatcher records resolved runtime + omits unresolved (55 new lines), store normalizers preserve open engine identifiers and historical rows (59 new lines), gateway subagent runtime returns normalized runtime (30 new lines), UI normalization accepts open engines. Focused suites green: workboard extension 171, gateway server-plugins 177, ui workboard 70, dispatcher 172 (after rebase onto current main).
  • pnpm plugin-sdk:surface:check green (additive optional field only).
  • Autoreview (gpt-5.6-sol, xhigh): clean, no actionable findings.

Fixes #108362

… 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
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime plugin: workboard size: M maintainer Maintainer-authored PR labels Jul 16, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +155 to +157
provider: effectiveProviderOverride ?? sessionModel.provider,
model: sessionModel.model,
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 } : {}),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@steipete
steipete merged commit d5eebf0 into main Jul 16, 2026
116 checks passed
@steipete
steipete deleted the claude/codex-round-c branch July 16, 2026 11:10
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 17, 2026
… 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui gateway Gateway runtime maintainer Maintainer-authored PR plugin: workboard size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Workboard hardcodes Codex execution metadata for Claude agent runs

1 participant