Skip to content

Codex goal: blocked/usageLimited statuses are invisible and a blocked goal cannot be resumed #6551

Closed

Description

@altertima

Summary

A Codex goal that Codex moves to blocked (or usageLimited) is invisible to BB, and BB has no way to resume it:

  1. The provider-codex goal status schema only accepts active | paused | budgetLimited | complete. Codex 0.158 also emits blocked (a non-retryable turn error or exhausted retries stop the goal via stop_active_goal_for_turn(TurnError); the model can also set it through update_goal) and usageLimited. Such thread/goal/updated notifications fail validation and land in the thread log as provider/unhandled. The goal extension state keeps the last active payload, and activity.activeGoalCount stays 1.
  2. A blocked goal can only become active again through thread/goal/set {status: "active"} (the TUI's /goal resume). update_goal accepts only complete | blocked | paused, and a new tell turn does not reattach a non-active goal. BB exposes threads.clearGoal, but no goal set or resume in the CLI, SDK or REST API. The only workaround is clear followed by asking the agent to create_goal again, which resets tokensUsed and timeUsedSeconds.

Versions and environment

Steps to reproduce

  1. Spawn a Codex thread and instruct: "create_goal with objective X, then immediately call update_goal with status blocked".
  2. Wait until the thread is idle.
  3. Run bb thread log <id> --all --json and bb thread list --json.

Expected

  • thread/extensionState/updated (provider-codex/goal) reports status: "blocked", and activeGoalCount drops to 0.
  • A supported way to resume the goal, for example bb thread goal resume <id> or SDK threads.setGoal({threadId, status: "active"}) mapped to thread/goal/set.

Actual

  • The blocked update appears only as provider/unhandled (rawType: thread/goal/updated, rawEvent.params.goal.status: "blocked"). The last extension-state payload still says active, and activeGoalCount is 1.
  • There is no resume path. Unattended goal runs that hit a transient provider error (for example a 503 after retries) stop permanently unless an operator clears the goal and has the model recreate it.

Proposed change

  • Add blocked and usageLimited to the provider-codex goal status schema, and stop counting them as active.
  • Expose thread/goal/set (status, and optionally objective and token budget) through the provider capability, the REST API, the SDK and the bb thread CLI.

Activity

  1. added theissue type on Oct 29, 2026
  2. added
    providers
    provider-codex
    confirmed-repro
    on Oct 29, 2026
  3. bb-slop-cop commented on Oct 29, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    • Classification applied: Bug · Priority Medium · Effort High; labels providers, provider-codex, confirmed-repro. All were missing; no existing classification was replaced.
    • Report: Reproduction and root-cause evidence.
    • Verdict: REPRODUCED · root-cause confidence high, repeated by the same agent in two clean checkouts of trusted main (3bacfac9ed).
    • Root cause: Incoming, extension-state, and public timeline validators omit blocked and usageLimited. The notifications become provider/unhandled, retaining the previous active snapshot. Supported control contracts also lack goal resume.
    • Verification: The report includes the complete translator/assembler/projection regression test: both affected statuses fail as expected, three control transitions pass, and all 67 existing translation tests pass. No live provider failure or native resume RPC was exercised.
    • No PR: Correcting the public status schema and adding cross-subsystem resume contracts violate this rule’s simple-fix constraints.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-reproprovider-codexproviders

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions