Skip to content

[Feature]: expose protect_first_n in config #13751

Description

@simpolism

Problem or Use Case

Compression preserves a head that's currently set to protect_first_n=3, hard-coded. I would like to not have compression preserve the first turn.

Proposed Solution

A protect_last_n already is exposed to config, so I figured the easiest path forward would be to expose a parallel config variable.

Alternatives Considered

Could just hard-code it in my fork, but might as well upstream the change.

Feature Type

Configuration option

Scope

Small (single file, < 50 lines)

Contribution

  • I'd like to implement this myself and submit a PR

Debug Report (optional)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/configConfig system, migrations, profilescomp/agentCore agent runtime: loop, agent_init, prompt builder, context-compression, responses endpointtype/featureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions