openclaw - 💡(How to fix) Fix Track Codex harness prompt latency overhead

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Short Discord prompts routed through the new Codex harness can still show multi-second latency and outliers even when the model response itself is fast. Local profiling showed avoidable overhead in the wrapper path around Codex attempts, especially dynamic tool preparation and repeated runtime/config resolution on hot replies.

Error Message

  • #85465 fixes Discord progress/finalization behavior and the tool-error final path. This is needed so Discord smoke tests report the real final response instead of a stale progress/error final.

Root Cause

Short Discord prompts routed through the new Codex harness can still show multi-second latency and outliers even when the model response itself is fast. Local profiling showed avoidable overhead in the wrapper path around Codex attempts, especially dynamic tool preparation and repeated runtime/config resolution on hot replies.

Fix Action

Fix / Workaround

The problematic path was observed during short Discord ping-style prompts against the Codex harness. After the patches above were applied to a local integration branch:

Targeted tests run locally against the patched integration worktree:

RAW_BUFFERClick to expand / collapse

Summary

Short Discord prompts routed through the new Codex harness can still show multi-second latency and outliers even when the model response itself is fast. Local profiling showed avoidable overhead in the wrapper path around Codex attempts, especially dynamic tool preparation and repeated runtime/config resolution on hot replies.

Pull requests

  • #85465 fixes Discord progress/finalization behavior and the tool-error final path. This is needed so Discord smoke tests report the real final response instead of a stale progress/error final.
  • #86228 skips Codex dynamic tool construction when the dynamic tool exclude list disables all regular dynamic tools.
  • #86229 caches repeated hot-path runtime plugin/config lookups for selected agent harness execution and queued reply execution config resolution.

Local evidence

The problematic path was observed during short Discord ping-style prompts against the Codex harness. After the patches above were applied to a local integration branch:

  • Codex dynamic tool construction was skipped when excluded tools were configured.
  • The repeated runtime/config lookup path became hot-cacheable instead of being recomputed per prompt.
  • The measured wrapper overhead over model time dropped to a small fraction of the previous multi-second wall time on the local reference gateway.
  • Remaining outliers appear more likely to come from the model wait, provider transport, or other request-level queueing rather than the dynamic tool build path.

Validation

Targeted tests run locally against the patched integration worktree:

  • extensions/codex/src/app-server/run-attempt.test.ts
  • src/agents/harness/runtime-plugin.test.ts
  • src/auto-reply/reply/agent-runner-utils.secret-resolution.test.ts

Diff hygiene checks were also run before opening the PRs.

Remaining work

  • Validate the same integration branch on the main gateway, not only the performance reference gateway.
  • Keep profiling enabled for Codex harness attempts so future regressions expose a per-stage breakdown.
  • Investigate any remaining multi-second outliers after the wrapper overhead fixes land.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING