Skip to content

docs(pi): correct root cause to provider-verified 65536 output cap - #55

Merged
github-actions[bot] merged 1 commit into
mainfrom
feat/loop-rootcause-correction
Aug 30, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
feat/loop-rootcause-correction

Conversation

@atrawog

@atrawog atrawog commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Summary

PR #53 merged with the pre-spike root-cause framing (which suggested lowering thinking and raising maxTokens to 131072). A live pi -p spike then proved both wrong: the provider rejects max_tokens above 65536 for deepseek-v4-flash:0731 via ollama-cloud (max_tokens (131072) exceeds model's maximum output tokens (65536)). This correction replaces that section in .pi/APPEND_SYSTEM.md with the provider-verified truth:

  • Real maximum output = 65536 (provider-verified; catalog's 32768 is understated).
  • maxTokens must be 65536 — never higher (rejected), never lower (wastes capability).
  • Truncation = a single response (high thinking + long tool call) exceeding 65536 → finish_reason="length" → harness fails the tool calls → loop.
  • Downgrading thinking is NOT a root-cause fix; the model is used at FULL capability (maxTokens 65536, thinking high). The only truncation lever that preserves capability: short tool calls + subagent delegation.

How tested

  • Spike (pi -p, live): maxTokens: 131072 → provider rejection max_tokens (131072) exceeds model's maximum output tokens (65536). This empirically established the real cap.
  • Config corrected to maxTokens: 65536 in ~/.pi/agent/models.json (verified); rejection gone.
  • git commit pre-commit gate: pre-commit: OK.

Rulebook compliance

  • R1: root cause verified empirically against the live provider (spike), not guessed.
  • R4: config aligned with the provider-verified real maximum; no workaround.
  • R5: the incorrect pre-spike guidance is replaced in this commit; no stale claims remain.

Change classification

  • Change class: documentation (harness guidance doc).
  • Verification gate: pre-commit gate passed; root cause proven by live provider rejection.
  • Attribution tier: analysed on a live system.

Assisted-by: pi openrouter/deepseek/deepseek-v4-flash-0731 (analysed on a live system)

Spike (pi -p) proved the real maximum output for deepseek-v4-flash:0731 via
ollama-cloud is 65536 tokens: the provider rejects max_tokens above it with
"max_tokens (N) exceeds model's maximum output tokens (65536)". The catalog's
32768 is understated. maxTokens must be 65536 (the true max); truncation
occurs when a single response (high thinking + long tool call) exceeds 65536;
the fix is short tool calls + subagent delegation, never lowering thinking or
raising maxTokens beyond the cap.
@github-actions

Copy link
Copy Markdown
Contributor

Review — PASS

Head SHA: 6c26affdb96e04c66d642c015836e56fccf5d10c (branch: docs/pi-root-cause-65536)

Security screen: PASS — docs-only change to .pi/APPEND_SYSTEM.md; no code, no secrets, no guardrail weakening, no embedded directives.

Checklist: All applicable rules PASS or NA.

  • A1/A2/A3: Body accounts for the single-file diff, supplies spike evidence (quoted provider rejection), names the pre-commit gate, and claims analysed on a live system — appropriate for a docs-only change with live-verified root cause, not inflated. Attribution footer present in exact form.
  • R1/R4/R5: The change is itself an RCA correction, provider-verified; config aligned to the real maximum; stale pre-spike guidance replaced in the same commit.
  • B15: Single atomic commit.
  • B16/B17/B18/B13/B14: N/A (docs-only; no candy/schema/Go/architecture/autonomy surface touched).

Verdict: PASS


ollama/deepseek-v4-flash — pi-review-action.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) August 30, 2026 10:31
@github-actions
github-actions Bot merged commit 1300bec into main Aug 30, 2026
1 check passed
charly-auto-merge Bot added a commit that referenced this pull request Aug 30, 2026
atrawog added a commit that referenced this pull request Aug 31, 2026
…in batch (#83)

Produced by task sync, not hand-pinned. Four gitlinks:

    charly           0e4d026d -> 8b194ed8   (its default branch)
    distro-omarchy   b82ed69e -> 2081960d   (policy B: exactly what charly pins)
    distro-cachyos   db2199a9 -> 677dbbe0   (policy B)
    distro-fedora    47cac269 -> 53bd54c0   (policy B)

Policy B verified independently of the script: each distro pin equals THE COMMIT CHARLY PINS,
which for cachyos and fedora is NOT their latest main - tag-on-merge added a CHANGELOG commit
past the tree charly composes, and pinning that would break the invariant.

## What it brings in

    charly          #508  the parse-time prescan never read an imported project's plugin pins,
                          plus box/omarchy, box/cachyos, box/fedora and plugin-check
    distro-omarchy  #11   check-omarchy-desktop-vm - the first bed proving the DESKTOP comes up
    distro-cachyos  #55   pin the cstream verb plugin so the bed parses when composed
                    #56   complete the pin advance charly#506 started
    distro-fedora   #47   the second copy of the same pin list

Two are worth naming. charly's main was RED: a bed that validated at exit 0 from its own repo
root failed at exit 1 the moment charly composed it, because the prescan walked the root
manifest and discover: paths but never import:. And charly#506 advanced 11 candy pins in one
copy of a list that exists as three independent copies, so three candies resolved at two
versions until every copy moved.

## Why only four gitlinks and not the 89 task sync moved

task sync advances EVERY submodule to its default-branch HEAD, and this run moved 89. The other
85 are unrelated to this work and #66 is already in flight covering that ground;
landing both would collide.

The four committed here are the values task sync produced - not hand-picked - and they are
exactly what Policy B requires: charly moved, so its distro pins must follow. The remaining 85
are left to #66 rather than raced.

## How tested

    task verify
    check-policy-b: OK - 6 distro pins equal charly's gitlinks
    verify-pins: OK - 349 submodules, policy B holds
    exit 0

Claude-Session: https://claude.ai/code/session_01YKF2VLqeHHbrBDz8XftaD3

Co-authored-by: atrawog <[email protected]>
@aitrawog
aitrawog deleted the feat/loop-rootcause-correction branch September 25, 2026 18:27
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