"npm:@raoxxxwq/pi-codex-fast
"npm:@thunstack/auto-compact",
"npm:@lll9p/pi-better-compaction",
这一套组合拳,让我的pi再也不会出现上下文超过100%还不触发压缩了
配置:
agent/auto-compact.json
{
"version": 1,
"enabledAtSessionStart": true,
"thresholdPercent": 85,
"autoResume": true,
"resumptionInstruction": "Continue the unfinished work from the compaction summary. Preserve prior decisions, avoid repeating completed work,and proceed with the next pending step.",
"waitForTurnEnd": true,
"additionalCompactionInstruction": "Preserve unfinished work and exact details required to resume safely."
}
agent/extensions/pi-better-compaction/config.json
这个扩展还是站内某位大佬的
{
"enabled": true,
"allowCompactionContinuityBreak": false,
"compactionModel": null,
"compactionThinkingLevel": "off",
"responsesCompactApis": ["openai-responses"],
"notifyOnLoad": false,
"debug": false,
"logProviderPayloads": false,
"logCompactResponses": false,
"redactSensitiveData": true,
"artifactRoot": "~/.pi/agent/artifacts/pi-better-compaction"
}
codex-fast
agent/extensions/pi-codex-fast.json
{
"enabled": false,
"models": [
"gpt-5.4",
"gpt-5.5",
"gpt-5.6-sol"
],
"providers": [
"openai",
"openai-codex",
"openai-responses"
]
}