// Copyright (c) Microsoft. All rights reserved. namespace Microsoft.Agents.AI.Tools.Shell; /// /// Specifies how a shell executor dispatches commands to the underlying shell. /// public enum ShellMode { /// /// Each command runs in a fresh shell subprocess. State (working directory, /// environment variables) is reset between calls. /// Stateless, /// /// A single long-lived shell subprocess is reused across calls so /// cd and exported / $env: variables persist between /// invocations. Commands are executed via a sentinel protocol that /// brackets stdout to determine completion. This is the recommended /// default for coding agents because it eliminates the "agent runs cd /// and then runs the wrong path" failure class. /// Persistent, }