Skip to content

fix(agent): restrict memory flush to memory tools only - #139

Draft
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/critical-bug-investigation-c6bf
Draft

cursor[bot] wants to merge 2 commits into
mainfrom
cursor/critical-bug-investigation-c6bf

Conversation

@cursor

@cursor cursor Bot commented Aug 11, 2026

Copy link
Copy Markdown

Summary

  • Pre-compaction memory flush ran a full agent loop under SilentEventSink with builtins/skills/MCP available. Non-key-path write_file needs no confirmation, so a silent flush could overwrite workspace files; Low-tier run_command could also auto-approve after PR fix(agent): deny ConfirmRequired in SilentEventSink #138.
  • Flush turns now set memory_tools_only and build a registry that registers only memory_search / memory_write / memory_list (no builtins, skills, or MCP).
  • Adds registry regression tests locking the restricted surface.

Task Linkage

  • Task ID: TASK-2026-071
  • Task folder: tasks/TASK-2026-071-memory-flush-tool-allowlist/

Injected Specs

  • spec/architecture-boundaries.md (agent loop / extension registry only; no crate boundary changes)
  • spec/security-nonnegotiables.md (silent background turn must not mutate workspace)
  • spec/testing-policy.md (Rust code change + regression tests)
  • spec/docs-sync.md (reviewed; not needed — no user-facing command/env/docs change)
  • Additional: spec/verification-integrity.md, spec/task-artifact-language.md, spec/rust-conventions.md

Validation Evidence

  • Commands executed:
    • cargo fmt --check
    • cargo clippy -p skilllite-agent --all-targets -- -D warnings
    • cargo test -p skilllite-agent memory_flush
    • cargo test -p skilllite-agent
    • python3 scripts/validate_tasks.py
  • Key results:
    • fmt: exit 0
    • clippy agent: exit 0
    • focused: 2 passed (memory_flush_registry_*)
    • agent crate: 249 passed; 0 failed
    • task validation: Task validation passed (71 task folders checked)

Regression Scope

  • Areas likely affected:
    • Pre-compaction / early memory flush turns
    • Extension registry capability policies
  • Explicit non-goals:

Docs Sync (EN/ZH)

  • Not needed
  • Updated EN + ZH docs
  • Files:
    • N/A

Review Checklist

  • Acceptance criteria in tasks/TASK-2026-071-memory-flush-tool-allowlist/TASK.md satisfied
  • tasks/TASK-2026-071-memory-flush-tool-allowlist/STATUS.md updated with latest progress
  • tasks/TASK-2026-071-memory-flush-tool-allowlist/REVIEW.md includes merge readiness decision
  • tasks/board.md status is up to date
Open in Web View Automation 

cursoragent and others added 2 commits August 11, 2026 11:04
Silent pre-compaction flush previously ran a full agent loop under
SilentEventSink, so unconfirmed mutators like write_file could rewrite
the workspace. Flush turns now register memory tools only.

Co-authored-by: EXboy <EXboys@users.noreply.github.com>
Record validation results, review readiness, and board status for
TASK-2026-071 after agent crate tests and clippy passed.

Co-authored-by: EXboy <EXboys@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant