Skip to content

Bound a session's spill files so long background shells cannot fill the disk #679

Open

Description

@hakula139

Goal

A session's spill files grow without bound. Each capped tool call and each background-shell read writes its own file under the session's artifact directory, and the output cap applies per file, so a long-running background shell read many times can fill the disk. docs/design/tools/truncation.md decision 3 records the risk, and no issue tracks it.

Acceptance criteria

  • A session's spill files stay within a fixed total size.
  • A result whose spill file is gone still renders: its inline head and tail remain, and any marker that names a file says when the file is no longer available.
  • docs/design/tools/truncation.md decision 3 describes the policy.
  • A test covers repeated background-shell reads that exceed the budget.

Notes

Spill files live in the directory store::artifact_dir names beside the session file, and /delete removes them with the session. Spill::write in crates/ox-core/src/tool/spill.rs creates them, following the head-and-tail strategy docs/design/tools/truncation.md describes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: toolsenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions