Skip to content

fix: plan H reliability items (transient retries, reasoning truncation, Codex redirect, discovery auth, user deny_shell_prefixes) - #501

Merged
lg2m merged 7 commits into
mainfrom
feat/plan-h-reliability
Oct 29, 2026
Merged

lg2m merged 7 commits into
mainfrom
feat/plan-h-reliability

Conversation

@lg2m

@lg2m lg2m commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

Change

Five reliability items from plan section H, and a ban on new code comments in AGENTS.md. Store retention and a server-side /undo will follow in a second PR stacked on this one.

  • Transient provider errors. xAI's "Internal error during token generation", sent after HTTP 200, is now retried like "overloaded". The local session store has 7 xai/grok-4.7 runs that failed on this error.
  • Turns spent on reasoning. When a turn reaches the output limit with no text or tool call and the cap can't be raised further, the run used to fail at once. It now appends a runtime notice telling the model to reason less and retries, up to 3 times. The notice is persisted with the turn, so replayed context matches what the provider received. Compaction summarizers still fail their step as before. The store has 6 claude-opus-5-5 runs that failed with "stopped at its output token limit (16384 tokens) without producing any visible output on 1 consecutive turn".
  • Codex login. The OAuth redirect is now http://127.0.0.1:{port}/auth/callback, the address the callback server listens on. Upstream Codex sends the same redirect.
  • Model discovery. Discovery builds its auth headers from qq-provider's RequestCredential, adding the public RequestCredential::header and headers(). The separate DiscoveryAuth type is deleted. The single global fetch lock is replaced by one lock per provider, so a slow provider no longer stalls discovery for the others.
  • deny_shell_prefixes from any layer. User and project config can now set it, not only managed config. The lists from all layers are combined. A project layer that is still waiting for trust adds its entries too, since a deny grants no authority. Denial messages no longer say "managed". Docs are updated.
  • AGENTS.md. New code must not add //, ///, //! or /* */ comments. The principles skill says the same.

Verification

Each regression test failed before its fix and passes after:

  • cargo nextest run -p qq-auth -E 'test(/codex_login_uses_pkce/)': the old code sent localhost.
  • cargo nextest run -p qq-host -E 'test(/a_slow_provider_does_not_hold_discovery_for_another/)': with one global gate it timed out.
  • cargo nextest run -p qq-config -E 'test(/shell_prefix_denies_union/)': failed with the old managed-only check, and also fails if the union is moved after the trust gate.
  • cargo nextest run -p qq-core -E 'test(/a_summarizer_turn_spent_on_reasoning/)': fails if the summarizer exclusion is removed.
  • cargo nextest run -p qq-core -E 'test(/an_empty_truncated_turn/)': the existing tests now assert the notice is sent and replayed.
  • cargo xtask check passed on the pushed head.

Known impact

  • A turn that keeps producing nothing now uses up to 3 more provider calls before the run fails.
  • When a run does fail this way, its retry notices stay in the context the next prompt replays.
  • GoalCheckPolicyError::ManagedDenied is renamed ShellDenied. It is internal to qq-core and qq-host.
  • xtask/src/legacy-sleeps.txt line numbers moved. No new sleeps were added.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T16:57:06.958760Z 18d7414 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@lg2m

lg2m commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 18d741469e

ℹ️ 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".

@lg2m
lg2m merged commit 46db8cf into main Oct 29, 2026
10 checks passed
@lg2m
lg2m deleted the feat/plan-h-reliability branch October 29, 2026 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant