pi-mono/packages/coding-agent/docs
David Brailovsky 6fcb48670f
fix(coding-agent): remove fixed output limits from summary requests (#11036)
Compaction summaries were limited to 0.8 * compaction.reserveTokens (13107 by default), turn-prefix summaries to 0.5 * reserveTokens, and branch summaries to a hardcoded 4096. On providers where reasoning shares the output limit (OpenAI Responses, adaptive Anthropic), high thinking levels used most of that limit and compaction failed with "generation hit the token cap", even though the model allows far more output.

Tying the limit to reserveTokens assumed the summary request is as large as the full context, so its output had to fit in the reserved space. It is usually much smaller: recent messages kept by keepRecentTokens are not sent, a split turn goes to a separate request, tool results are truncated, and tool definitions and the normal system prompt are not included. Manual compaction can also run long before the context is full. The provider layer already sizes output from the actual request, using the model's output limit reduced to fit the remaining context, as for normal turns.

Summary requests now set no maxTokens and rely on that. compaction.reserveTokens only controls when compaction starts.

generateSummary() and generateSummaryWithUsage() now ignore the reserveTokens parameter.

closes #9512, closes #9075, closes #10908
2026-10-16 13:53:16 +02:00
..
images docs(coding-agent): refresh documentation (#9898) 2026-09-22 16:48:19 +02:00
cli-integration.md fix(coding-agent): warn and exit non-zero in print mode on truncated response 2026-10-12 16:06:42 +02:00
cli.md fix(coding-agent): resolve model references through one provider selection policy (#10913) 2026-10-14 11:00:21 +01:00
codemode.md fix(coding-agent): keep codemode cancellation prompt and bounded 2026-10-13 18:17:31 +02:00
compaction.md fix(coding-agent): remove fixed output limits from summary requests (#11036) 2026-10-16 13:53:16 +02:00
configuration.md feat(coding-agent): codemode and MCP 2026-09-29 09:12:50 +02:00
containerization.md docs(coding-agent): refresh documentation (#9898) 2026-09-22 16:48:19 +02:00
custom-provider.md feat(ai,coding-agent): unify image and classifier model infrastructure (#9948) 2026-09-23 17:41:19 +02:00
docs.json docs(coding-agent): add NVIDIA RTX llama.cpp setup 2026-10-13 14:15:52 +01:00
environment-variables.md feat(coding-agent): add PI_CLIPBOARD_OSC52 to force OSC 52 copies 2026-10-12 18:07:27 +02:00
extensions.md fix(coding-agent): emit before_agent_start for runs started by custom messages (#10739) 2026-10-12 09:53:24 +02:00
how-pi-works.md docs(coding-agent): refresh documentation (#9898) 2026-09-22 16:48:19 +02:00
index.md docs(coding-agent): add Radius to providers page, rename provider docs sections 2026-10-01 17:06:00 +02:00
json.md feat(tui,coding-agent): report program status via OSC 7501 2026-10-07 19:05:41 +00:00
keybindings.md feat(coding-agent): use pi.dev configuration schemas (#10751) 2026-10-11 14:48:42 +01:00
llama-cpp.md docs(coding-agent): add NVIDIA RTX llama.cpp setup 2026-10-13 14:15:52 +01:00
mcp.md refactor(codemode,coding-agent): decouple MCP from codemode 2026-10-12 09:19:30 +02:00
message-types.md docs(coding-agent): align documented message types (#10566) 2026-10-06 15:05:49 +02:00
models.md feat(coding-agent): use pi.dev configuration schemas (#10751) 2026-10-11 14:48:42 +01:00
nvidia-rtx-llama-cpp.md docs(coding-agent): restructure NVIDIA RTX llama.cpp prerequisites 2026-10-13 15:04:38 +01:00
packages.md refactor(coding-agent): resolve built-in extensions as builtin:<name> paths (#10159) 2026-09-29 10:51:01 +02:00
prompt-templates.md docs(coding-agent): refresh documentation (#9898) 2026-09-22 16:48:19 +02:00
providers.md feat(ai,coding-agent): list only the OpenRouter models a key may use (#10672) 2026-10-12 10:17:40 +02:00
quickstart.md feat(coding-agent): add Nix flake (#9137) 2026-10-02 18:30:51 +02:00
rpc-commands.md feat(coding-agent): report prompt disposition in RPC responses 2026-09-25 14:53:11 +02:00
rpc-extension-ui.md docs(coding-agent): refresh documentation (#9898) 2026-09-22 16:48:19 +02:00
rpc.md feat(coding-agent): report prompt disposition in RPC responses 2026-09-25 14:53:11 +02:00
sdk.md docs(coding-agent): add Radius to providers page, rename provider docs sections 2026-10-01 17:06:00 +02:00
security.md feat(coding-agent): codemode and MCP 2026-09-29 09:12:50 +02:00
session-format.md feat(coding-agent): Virtual models (#10035) 2026-09-28 23:30:45 +02:00
sessions.md feat(coding-agent): configure session share destination 2026-10-13 15:41:13 +02:00
settings.md fix(coding-agent): remove fixed output limits from summary requests (#11036) 2026-10-16 13:53:16 +02:00
shell-aliases.md docs(coding-agent): refresh documentation (#9898) 2026-09-22 16:48:19 +02:00
skills.md docs(coding-agent): refresh documentation (#9898) 2026-09-22 16:48:19 +02:00
slash-commands.md docs(coding-agent): refresh documentation (#9898) 2026-09-22 16:48:19 +02:00
terminal-setup.md feat(tui,coding-agent): report program status via OSC 7501 2026-10-07 19:05:41 +00:00
termux.md docs(coding-agent): refresh documentation (#9898) 2026-09-22 16:48:19 +02:00
themes.md feat(coding-agent): use pi.dev configuration schemas (#10751) 2026-10-11 14:48:42 +01:00
tmux.md docs(coding-agent): refresh documentation (#9898) 2026-09-22 16:48:19 +02:00
tui.md feat(tui,coding-agent): use only the terminal cursor when showHardwareCursor is enabled 2026-10-08 00:23:06 +02:00
usage.md feat(coding-agent): configure session share destination 2026-10-13 15:41:13 +02:00
virtual-models.md feat(coding-agent): Virtual models (#10035) 2026-09-28 23:30:45 +02:00
windows.md feat(coding-agent): support +name/-name in defaultTools 2026-09-29 14:02:57 +02:00