Skip to content

fix(runtime): do not treat trivial attachment reads as substantive scientific execution #467

Description

@HaoxuanLiTHUAI

Summary

A trivial attachment read can be classified as substantive scientific execution, triggering the Principal workflow guard, unnecessary trace work, and repeated final replies.

Reproduction

Upload a small text file named brainpilot-safari-upload-test.txt and ask:

Read the attached synthetic test file and reply with exactly the value after session-isolation-marker, with no other text.

Observed

  • The Principal correctly reads the 135-byte file.
  • It emits the requested marker three times as three distinct persisted assistant messages.
  • A warning is persisted: Principal ignored the required Expert-delegation reminder; the research workflow remains incomplete.
  • The trivial task consumes about 69,970 tokens including trace processing.

This is not history/SSE replay duplication: the three messages have different message_id values.

Root cause

isSubstantiveScientificExecutionRequest() treats attached ... file as concrete input and matches the adjective test in “test file” as an input-bound execution action.

Acceptance criteria

  • Attachment notices and filenames do not influence execution-intent classification.
  • “Read/quote/extract this test file” stays non-substantive.
  • “Test/evaluate/analyze the attached dataset” remains substantive.
  • The reproduction produces one final answer and no delegation violation.

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