Skip to content

[Bug]: Subagent announce compaction for Codex/OAuth falls into openai-responses API-key route #90925

Description

@DolencLuka

Bug type

Regression / routing bug

Summary

A high-context parent session using openai/gpt-5.5 through the Codex runtime with OpenAI OAuth can receive a completed subagent, but the subagent completion announce path fails while compacting the requester/parent transcript.

The failure signature is that announce compaction routes through openai/openai-responses and rejects the OAuth auth profile because that path requires an OpenAI API-key profile. The subagent itself completed; the delivery back to the parent then retries and gives up.

This looks distinct from ordinary compaction working in the parent session. It appears specific to the subagent announce / requester wake path under context pressure.

Environment

  • OpenClaw version: 2026.6.1 (2e08f0f)
  • Channel surface: Discord channel
  • Parent model: openai/gpt-5.5
  • Runtime shown by session status: OpenAI Codex
  • Auth mode: OpenAI OAuth profile, not an OpenAI API-key profile
  • Context pressure at/near failure: high-context parent session, roughly 70%+ in one repro and 90%+ later in the same investigation

Steps to reproduce

Observed live repro shape:

  1. Use a parent/requester session on openai/gpt-5.5 with effective Codex runtime and OpenAI OAuth auth.
  2. Let the parent session reach high context usage so a completion wake/announce may need requester transcript compaction.
  3. Spawn a native subagent and wait via the normal push/yield completion path.
  4. Have the subagent complete successfully with a short marker/result.
  5. Observe that the parent does not receive a normal visible completion; instead the announce path retries and gives up.

A lower-context canary did not hit the failure. A higher-context canary reproduced it.

Expected behavior

Subagent completion announce/wake should use the same effective Codex runtime/auth policy as the parent session. If requester transcript compaction is needed, it should compact through the Codex-compatible path for openai/gpt-5.5 + OAuth, or otherwise avoid dropping the completion.

It should not fall into openai/openai-responses with an OAuth profile that requires an API key.

Actual behavior

The child completes successfully, but parent-side announce/delivery compaction fails with the following redacted signature:

CLI transcript compaction failed for openai/gpt-5.5: Auth profile "openai:<redacted>" uses oauth auth, but openai/openai-responses requires an OpenAI API key profile.

The gateway then retries and reaches:

Subagent announce give up

The result can still be discovered internally afterwards, but the normal parent-visible completion delivery failed.

Why this seems narrower than existing reports

Related issues found before filing:

This report combines a specific failure across those surfaces: subagent completion announce needs/attempts parent compaction, but the compaction backend appears to resolve the OpenAI model/provider as generic openai/openai-responses instead of the effective Codex runtime route, producing the OAuth-vs-API-key failure and then dropping announce delivery.

Impact

High for subagent-heavy Codex/OAuth workflows. A completed subagent result can fail to surface in the requester channel exactly when the parent is context-heavy, which is a common state for long orchestration work.

Using a broad OpenAI API-key fallback may mask this, but it is not a good fix for users intentionally using Codex/OAuth and avoiding generic OpenAI API spend/fallback.

Requested fix direction / question

Please confirm the intended routing contract for requester-side compaction during subagent announce/wake.

If the active parent session resolves openai/gpt-5.5 to Codex runtime + OAuth, the announce compaction path should resolve the same effective runtime/auth policy instead of relying on a thinner persisted session/provider record that can fall into openai/openai-responses.

Acceptance criteria could be:

  • High-context parent on openai/gpt-5.5 + Codex runtime + OAuth.
  • Completed native subagent announces back to the parent successfully.
  • Logs do not show openai/openai-responses requires an OpenAI API key profile during requester transcript compaction.
  • The completion is delivered visibly or enters a durable recoverable state instead of retry-limit give-up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions