Skip to content

Per-agent overrides for compaction settings #759

Open

Description

@iceteaSA

Today:

  • execute_threshold_percentage, execute_threshold_tokens and cache_ttl can be set per model (packages/plugin/src/config/schema/magic-context.ts:1218-1275).
  • profiles may only hold historian/dreamer model, fallback and variant fields (:1192-1193).
  • Subagent sessions run in a reduced mode (packages/plugin/src/hooks/magic-context/transform.ts:1167).

No setting is keyed by agent name, so every session on the same model gets the same compaction policy.

Use case: children dispatched for one short task, such as a lookup or a test run, could run with a lower execute threshold or without reduction nudges. A long-lived child, such as an implementer or reviewer that gets resumed for several rounds, could keep the root's settings. Today these differ only by model.

Request: an optional per-agent override block, resolved from the session's agent name and taking precedence over the per-model value, for example:

"agents": {
  "explore": { "execute_threshold_percentage": 50 },
  "reviewer": { "execute_threshold_percentage": 70, "cache_ttl": "1h" }
}

It covers the same fields that already take per-model values. Whether it lives in a new block or as a profile field is your call.

Prior art: Claude Code 2.1.296 autoCompactWindow for each subagent.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions