fabro/crates/agent/src
Bryan Helmkamp 139f653d33 Add read-before-write guardrail for ExecutionEnvironment
Decorator that tracks which files the agent has read (via read_file or
grep) and returns an error when writing to an existing file that hasn't
been read first. Prevents the model from hallucinating file contents and
blindly overwriting working code. New files are always allowed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: a565c5a5e2f9
2026-02-25 10:24:58 -05:00
..
profiles Revert clippy config to defaults, remove all pedantic/nursery/cargo lint suppressions 2026-02-24 09:42:28 -05:00
cli.rs Add LLM conversation events to PipelineEvent for progress.ndjson observability 2026-02-24 14:08:22 -05:00
config.rs Add auto-compaction to prevent context window overflow in long agent sessions 2026-02-24 23:09:38 -05:00
docker_env.rs Revert clippy config to defaults, remove all pedantic/nursery/cargo lint suppressions 2026-02-24 09:42:28 -05:00
error.rs Rename unified-llm crate to llm 2026-02-23 09:22:14 -05:00
event.rs Add LLM conversation events to PipelineEvent for progress.ndjson observability 2026-02-24 14:08:22 -05:00
execution_env.rs Revert clippy config to defaults, remove all pedantic/nursery/cargo lint suppressions 2026-02-24 09:42:28 -05:00
history.rs Add auto-compaction to prevent context window overflow in long agent sessions 2026-02-24 23:09:38 -05:00
lib.rs Add read-before-write guardrail for ExecutionEnvironment 2026-02-25 10:24:58 -05:00
local_env.rs Revert clippy config to defaults, remove all pedantic/nursery/cargo lint suppressions 2026-02-24 09:42:28 -05:00
loop_detection.rs Revert clippy config to defaults, remove all pedantic/nursery/cargo lint suppressions 2026-02-24 09:42:28 -05:00
main.rs Merge agent-cli crate into agent as cli module 2026-02-23 11:14:25 -05:00
project_docs.rs Rename coding-agent-loop crate to agent 2026-02-23 09:17:48 -05:00
provider_profile.rs Rename unified-llm crate to llm 2026-02-23 09:22:14 -05:00
read_before_write_env.rs Add read-before-write guardrail for ExecutionEnvironment 2026-02-25 10:24:58 -05:00
session.rs Add auto-compaction to prevent context window overflow in long agent sessions 2026-02-24 23:09:38 -05:00
subagent.rs Revert clippy config to defaults, remove all pedantic/nursery/cargo lint suppressions 2026-02-24 09:42:28 -05:00
test_support.rs Revert clippy config to defaults, remove all pedantic/nursery/cargo lint suppressions 2026-02-24 09:42:28 -05:00
tool_registry.rs Replace abort_flag with CancellationToken for abort-aware process cancellation 2026-02-23 18:10:10 -05:00
tools.rs Revert clippy config to defaults, remove all pedantic/nursery/cargo lint suppressions 2026-02-24 09:42:28 -05:00
truncation.rs Revert clippy config to defaults, remove all pedantic/nursery/cargo lint suppressions 2026-02-24 09:42:28 -05:00
types.rs Add auto-compaction to prevent context window overflow in long agent sessions 2026-02-24 23:09:38 -05:00