Context Budget
Claustrum bundles context using token-budget partitioning instead of fixed-count clipping.
Workspace Settings
bundle_token_budget_total(default3000)bundle_budget_global_workspace_pct(default0.15)bundle_budget_global_user_pct(default0.10)bundle_budget_project_pct(default0.45)bundle_budget_retrieval_pct(default0.30)
Effective Allocation
For a total budget B:
- workspace global budget =
B * workspace_pct - user global budget =
B * user_pct - retrieval budget =
B * retrieval_pct - project snapshot budget is represented by bounded snapshot sections
Global Rule Selection
Selection order:
- Include pinned rules first.
- Include high-severity rules next (if budget allows after pinned).
- Fill remaining budget via configured mode:
scorerecentpriority_only
If rule count is high and summary is enabled, omitted rules are represented via summary text.
Debug Visibility
GET /v1/context/bundle?...&mode=debug
Debug payload includes:
- global budget per scope
- selected/omitted counts
- selection mode
- retrieval score breakdown for memory hits
Tuning Recommendations
- Keep
global_workspace_pct + global_user_pctaround0.20 ~ 0.35. - Keep retrieval budget high enough (
>= 0.25) for query-driven recall. - Increase summary usage when rules grow large instead of forcing hard limits.