Skip to content

fix(s08): recognize Anthropic prompt overflow errors - #561

Open
zmylol wants to merge 1 commit into
shareAI-lab:mainfrom
zmylol:fix/s08-prompt-too-long
Open

zmylol wants to merge 1 commit into
shareAI-lab:mainfrom
zmylol:fix/s08-prompt-too-long

Conversation

@zmylol

@zmylol zmylol commented Sep 6, 2026

Copy link
Copy Markdown

S08 now recognizes Anthropic's prompt is too long error and uses its existing reactive-compaction path to retry once. Previously that message bypassed recovery and propagated immediately. The change preserves the existing error markers and retry limit, synchronizes the three chapter READMEs, and adds five regression cases.

Fixes #560

Validation:

  • The new tests reproduced the bug before the fix: 2 failed, 7 passed in the S08 suite.
  • S08 and compaction-pair tests: 21 passed, 22 subtests passed.
  • The offline reproduction using the real SDK exception now follows API → reactive_compact → API.
  • Full Python suite: 486 passed, 1 failed, 100 subtests passed. The failure is the pre-existing progress-event ordering mismatch in test_s16_scenario_matches_the_deterministic_runtime, also reproduced on unmodified upstream main.
  • git diff --check and independent general/Python code reviews passed.

Prepared with AI assistance. Verification used mocked API responses without live model calls.

Recognize the documented prompt is too long message in the bounded reactive-compaction path. Synchronize all three chapter READMEs and add regression coverage for recovery, compatible markers, retry exhaustion, and unrelated errors.

Validation: 21 targeted tests and 22 subtests passed. Full suite: 486 passed, 1 pre-existing S16 scenario ordering failure, 100 subtests passed.

Refs shareAI-lab#560. Prepared with AI assistance.
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.

[s08] Reactive compaction does not recognize Anthropic's "prompt is too long" error

1 participant