portable-agent-layer 0.85.22 → 0.85.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -425,6 +425,17 @@ LoadContext.ts
425
425
  8. Other recent learnings (other projects, titles only)
426
426
  ```
427
427
 
428
+ ### Injection Budget
429
+
430
+ Claude Code caps each string a hook injects at **10,000 characters**: plain stdout as a whole, or each JSON field (`additionalContext`, `systemMessage`) on its own. Over the cap, the text is saved to a file and replaced with the file path plus a preview of the first 2,000 characters, and the model is never told to read the file. No setting raises the cap.
431
+
432
+ Design rules for anything injected by a hook (Tier 3 and per-prompt reminders):
433
+ - Stay under 10,000 characters per hook output.
434
+ - Put what matters most in the first 2,000 characters, in case a future change crosses the cap.
435
+ - Measure before adding a section: pipe a SessionStart payload into `LoadContext.ts` and count the bytes.
436
+
437
+ Tier 1 and Tier 2 load as memory files, not hook output, so this cap does not apply to them. Other agents' limits are not documented here; check them before relying on the same budget.
438
+
428
439
  ### On-Demand Context
429
440
 
430
441
  Everything else loads via the routing table in CLAUDE.md. The AI reads files only when the current task requires that context — no upfront loading of the full system.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "portable-agent-layer",
3
- "version": "0.85.22",
3
+ "version": "0.85.23",
4
4
  "description": "PAL — Portable Agent Layer: persistent personal context for AI coding assistants",
5
5
  "type": "module",
6
6
  "bin": {