Skip to content

feat(sdk): report the configured parent thread limit in scan preflight - #2405

Draft
cjc0013 wants to merge 13 commits into
openai:mainfrom
cjc0013:issue-25-scan-plan-final
Draft

cjc0013 wants to merge 13 commits into
openai:mainfrom
cjc0013:issue-25-scan-plan-final

Conversation

@cjc0013

@cjc0013 cjc0013 commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

SDK preflight and CLI dry-run now report configuredParentSessionThreadLimit from the effective Codex configuration, including the selected profile and CLI overrides. This optional field answers one before-start question in #25, which remains open.

Changes

The positive integer counts the parent and its delegated subagent threads. Deep workers derive their own cap from subagents, and direct execution may have no parent session. Actual dispatch, duration and cost depend on the scan. The CLI output schema declares the field as an optional positive integer. Literal dotted keys in an SDK override or project file can overlap the nested setting. In that case preflight omits the field because its effective value can depend on how Codex receives the configuration.

Testing

  • On Linux, all 107 tests in the SDK preflight configuration and CLI project configuration suites passed. Three SDK API tests also passed against the public preflight() entry point. These cover the default of nine, one parent thread, invalid limits, and a selected profile's limit of four with zero Deep worker subagents.
  • The SDK CI build, bundled plugin build, MCP and SDK typechecks, and package formatting checks passed. The regression suites ran locally without starting a model.
  • The schema regression failed before the correction and passed after it. On Linux, 156 focused CLI and SDK tests passed with seed 12345, along with six targeted API and cap tests. The bundled build, portable plugin checks, all nine checker tests, and changed-file formatting passed. The built CLI reported the schema field and the selected profile's thread limit.
  • Reproduced a literal dotted SDK table that reported nine threads in preflight while the native parent configuration read four. The corrected preflight omits the ambiguous limit. On Linux the four targeted SDK cases and 156 CLI and configuration tests passed, together with package and CI builds, portable source checks and all nine checker tests.
  • The full SDK run with seed 12345 stopped after three validation-persistence tests exceeded 30 seconds. Two of those also timed out against main. All three passed on the earlier PR revision when rerun with a 120-second timeout.
  • A contributor previously confirmed that both native Codex and the CLI reject zero.
  • On the prior head, Ubuntu 26.04 shard 6 failed the two inventory tests that exercise a ripgrep wrapper. Applied the existing fixture fix from test(sdk): preserve the env utility name in inventory fixtures #2678. Both targeted cases passed locally with 12 assertions using a temporary directory outside any checkout.

Risk and rollout

The new field changes the shape of preflight output for callers using exact object comparisons. Invalid limits in an unambiguous configuration now fail during preflight. The scheduler continues to use the existing native configuration.

Prior work and attribution

Public disclosure review

  • No customer, partner, prospect, or user identities, data, or identifying details are included.
  • No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
  • I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.

The checklist records the original submission review. The follow-up review covered the new commits, their diffs, the PR description, comments, public links, and the cited test results.

@github-actions github-actions Bot added the enhancement New feature or request label Nov 6, 2026
@mldangelo-oai mldangelo-oai changed the title feat(sdk): expose session thread capacity in scan preflight feat(sdk): report the configured parent thread limit in scan preflight Nov 9, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants