Skip to content

Gap ledger agent-sdks: background-command limit, bounded retry watchdog, message accept scope, Agent SDK 0.2.167 - #1157

Open
seathatflowsinourveins wants to merge 1 commit into
mainfrom
claude/cc-native-practice-close-agent-sdks-20261015
Open

seathatflowsinourveins wants to merge 1 commit into
mainfrom
claude/cc-native-practice-close-agent-sdks-20261015

Conversation

@seathatflowsinourveins

@seathatflowsinourveins seathatflowsinourveins commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Scope

  • What this PR changes, in one or two sentences: This PR closes the five ADOPT rows of the Claude Code practice gap ledger that fall on the agent-sdks layer (slot headless-sdk): B1-0006, B2-0002, B4-0001, B4-0002 and C1-0001. The command center dispatched the ledger on 2026-10-15, and each row was confirmed by a second-family gpt-6-astra re-check. Following the plan's closing rule, it is one slot-row PR for the layer page, with fail-first tests.
  • Base commit: 420452059
  • Lane: lane:foundation
  • Owned paths touched:
    • the practice skill's slots.json and agent-sdks.md, plus the slot manifest (only sha256_when_labeled changes);
    • tools/claude-review-worker/worker.py and its README.md;
    • catalogs/foundation/upstream-surface-dispositions.json;
    • adoption/new-wsl-profile.json and .md;
    • docs/new-wsl-handbook.json and .md, regenerated with scripts/build_new_wsl_handbook.py --write, plus its receipt;
    • tests/test_native_practice_ledger_rows_agent_sdks.py (new);
    • manifests/evidence.json.

Rows:

  • B2-0002 and B4-0001 (one change): in unattended runs (-p, the Agent SDK, CI) a background Bash command stops at a time limit:

    • 30 minutes, or the command's timeout up to 2 hours;
    • 10 minutes in a -p run whose prompt is text.

    The row records how to raise it and how it differs from CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS. No launcher changes: the review worker has no Bash, and the template's BASH_MAX_TIMEOUT_MS leaves the 2-hour maximum.

  • C1-0001: the review worker's sandbox env sets CLAUDE_CODE_RETRY_WATCHDOG=1 with CLAUDE_CODE_RETRY_WATCHDOG_MAX_WAIT_MS=900000, a third of the worker's 2700 s run timeout.

    • Key rotation on HTTP 402 or a credit-balance 400 is unchanged.
    • The watchdog retries 429 and 529 capacity errors. The 900000 ms setting caps only that wait, per request (env-vars.md:380).
    • On 2.1.199 and later the watchdog also raises the default retry count for other transient errors (server errors, timeouts, dropped connections) to 300, about three hours of backoff (env-vars.md:379). The worker's 2700 s run timeout, which ends the process group, is what bounds the whole run, those retries included.
    • The two disposition rows (upstream-surface-dispositions.json, lines 431 and 3809) move to enabled, with the worker as carrier. The second row's overturn condition was exactly this change.
    • Callers left without it, each with its reason: /skill-doctor (no model request), the capacity probes (a 429 is the reading), the gateway example, and the trading worker (that lane's call).
  • B4-0002: a -p worker that must take messages from a session in the other permission-mode class needs crossSessionInbound: accept in its --settings. No launcher in this repository takes messages:

    • The review worker is --restricted and one-shot.
    • The only such worker, the 2026-10-13 overnight MCP agent, launches from outside the repository and already passes the accept.
  • B1-0006: the new-WSL profile pins claude-agent-sdk 0.2.167, whose bundled CLI is 2.1.300.

    • The previous pin was 0.2.163, which bundled 2.1.286, below the 2.1.295 floor for onFailure hooks.
    • The checksum is PyPI's published sdist digest.
    • v0.2.167's install and test commands match v0.2.163's.
    • cli_path is recorded as the alternative.

SOTA sources

Evidence-class table

Claim Evidence class Command / receipt
Time limit, watchdog, message accept source_review the docs and CHANGELOG lines above
Worker env sets the watchdog and its cap synthetic tests/test_native_practice_ledger_rows_agent_sdks.py, tests/test_claude_review_worker.py
SDK 0.2.167 bundles CLI 2.1.300 source_review the SDK CHANGELOG at the tag and PyPI

Local commands run

$ python3 -m unittest tests.test_native_practice_ledger_rows_agent_sdks   # base 420452059 with only the new module
FAILED (failures=6)   e.g. AssertionError: '0.2.163' != '0.2.167'; AssertionError: None != '1'
$ python3 -m unittest tests.test_native_practice_ledger_rows_agent_sdks tests.test_claude_review_worker tests.test_new_wsl_profile
OK (skipped=1)
$ python3 -m unittest tests.test_new_wsl_handbook tests.test_new_wsl_definitive_defaults tests.test_catalog_freshness_runtime tests.test_native_practice_* (and the local-pages modules)
OK
$ python3 scripts/validate.py
rc 0; {"components": 71, "hashed_files": 12055, "profiles": 4, "receipts": 240, "status": "passed"}

tests.test_upstream_surface_watch has four CachedArtifactTests failures, identical on the base export. #1155 (open) fixes them; this module reruns after it lands.

Follow-ups

Checklist

  • No GitHub Actions changed.
  • No workflows changed.
  • No secrets are printed, logged or committed.
  • No new paid hosting, subscription or billing surface.
  • Peer-owned untracked files and worktrees were preserved.

🤖 Generated with Claude Code

…og, message accept scope, Agent SDK 0.2.167

Closes the five ADOPT rows of the 2026-10-15 Claude Code practice gap ledger on the agent-sdks page (slot
headless-sdk). Each row's basis was re-read at its primary source before applying; the text is in the slot's notes
(route, evidence and overturn_when unchanged, so the snapshot manifest changes only sha256_when_labeled).

- B2-0002 and B4-0001 (one change): the time limit on background commands in unattended sessions, 30 minutes or the
  timeout up to 2 hours, 10 minutes in a text-prompt -p run, raised only by BASH_DEFAULT_TIMEOUT_MS or
  BASH_MAX_TIMEOUT_MS (tools-reference.md:192-210; claude-code CHANGELOG.md:1280, :978).
- C1-0001: the review worker's sandbox runs with CLAUDE_CODE_RETRY_WATCHDOG=1 and
  CLAUDE_CODE_RETRY_WATCHDOG_MAX_WAIT_MS=900000, a third of its 2700 s run timeout (env-vars.md:379-380;
  CHANGELOG.md:384). The two disposition rows follow. Probes, the OmniRoute example and the trading lane's worker stay
  without it; the ns-run profiles run pi and OpenCode, not Claude Code.
- B4-0002: a fenced -p worker that must take messages carries crossSessionInbound accept in --settings
  (cross-session-messaging.md:203-231; cli-reference.md:125, :129). No launcher in this repository takes messages.
- B1-0006: the new-WSL profile pins claude-agent-sdk 0.2.167 (bundled CLI 2.1.300) instead of 0.2.163 (2.1.286, below
  the 2.1.295 onFailure floor); claude-agent-sdk-python@c10b52c6 README.md:15-18, CHANGELOG.md:3-7, :40-44. The
  handbook is regenerated with its builder and its receipt records the regeneration.

Tests: tests/test_native_practice_ledger_rows_agent_sdks.py (6 tests, all failing on 4204520, all passing here).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

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

lane:foundation Foundation lane: Claude/Codex setup, hosts, memory, RAG, research, workers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant