Skip to content

Strengthen compaction summaries and user-message provenance #4242

Closed

Description

@Buktal

Problem

The default Harness compaction prompt has no stable section for every unfinished task, and user-message attribution can become unreliable after a summary is flattened into transcript text. Explicit constraints, including security rules, may be weakened or omitted; assistant-quoted role labels, prior summaries, and framework-injected USER messages may be mistaken for genuine user requests or approvals.

Expected behavior

  • Use a fixed summary structure covering the user's request, technical context, changed files, pitfalls, pending tasks, and next step.
  • Preserve active security-relevant instructions in the user's wording.
  • List genuine user messages and distinguish them from assistant text, prior summaries, and synthetic framework notifications.
  • Keep all unfinished requested tasks and clarify that preserved tail messages are newer than the summary.

Acceptance criteria

  • Regression tests cover assistant text that looks like a transcript boundary, prior summaries, and synthetic user-role notifications.
  • The default prompt requests all pending tasks and preserves active security constraints verbatim.
  • English and Chinese Harness context documentation describe the summary behavior.

Activity

  1. added a commit that references this issue on Nov 19, 2026
    ea31907
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