Skip to content

[plan] Update cache memory handling for detection workflow #5762

@github-actions

Description

@github-actions

Overview

This tracking issue covers the implementation of conditional cache memory updates based on detection results in agentic workflows.

Source: Issue #5760

Problem

Currently, cache memories are updated unconditionally at the end of agentic jobs. This can be problematic when detection finds threats, as we don't want to persist potentially compromised memory states.

Solution

Implement a detection-aware cache update mechanism:

  • Agentic jobs upload memories as artifacts (not cache updates)
  • Detection jobs conditionally update cache based on threat detection
  • Handle the case when detection is disabled

Planned Tasks

  1. Modify agentic job to upload memories as artifacts - Change the memory persistence logic to use artifacts instead of cache updates
  2. Update detection job to handle memory artifacts - Download both cache and artifacts, conditionally update cache
  3. Handle detection-disabled case - Update cache directly in agent job when detection is disabled
  4. Update workflow compiler logic - Ensure compiler generates correct job dependencies and artifact handling

Acceptance Criteria

  • Memories are uploaded as artifacts in agentic jobs (not updated early)
  • Detection job downloads cache memory and memory artifacts
  • Cache is only updated if detection finds no threats
  • When detection is disabled, cache updates happen in agent job
  • All existing workflows continue to function correctly
    Related to Cache update #5760

AI generated by Plan Command for #5760

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions