You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Sandboxing terminal while running commands through agent. #277286
changed the title [-]Sandboxing terminal commands from agent execution[/-][+]Sandboxing terminal while running commands through agent.[/+]on Nov 17, 2025
I'm working on a VsCode Extension, and one workaround I think is define a default profile which use sandbox-exec to set the sandbox environment while creating terminal. What do you think Daniel Imms (@Tyriar) ?
Haven't implemented it yet, will feedback after trying.
Homyee King ホミイ (@HomyeeKing) we experimented with running the shell using sandbox-exec but too many things were breaking, so the current plan is to sandbox each command that's run within the shell
Homyee King ホミイ (@HomyeeKing) shells may read or write files, for example their history buffer. If that's the sandbox used to run commands, those commands could also do those things. There are also infinite possible shell setups, we couldn't possibly support everything.
Homyee King ホミイ (@HomyeeKing) shell hooks aren't available across the board, plus I'd prefer to lean in the direction of transparency than obfuscation personally.
Activity
[-]Sandboxing terminal commands from agent execution[/-][+]Sandboxing terminal while running commands through agent.[/+]HomyeeKing commentedon Jan 5, 2026
I'm working on a VsCode Extension, and one workaround I think is define a default profile which use sandbox-exec to set the sandbox environment while creating terminal. What do you think Daniel Imms (@Tyriar) ?
Haven't implemented it yet, will feedback after trying.
Tyriar commentedon Jan 5, 2026
Homyee King ホミイ (@HomyeeKing) we experimented with running the shell using sandbox-exec but too many things were breaking, so the current plan is to sandbox each command that's run within the shell
HomyeeKing commentedon Jan 5, 2026
Daniel Imms (@Tyriar) What kind of break? Cursor has already used
sandbox-execin productionTyriar commentedon Jan 5, 2026
Homyee King ホミイ (@HomyeeKing) shells may read or write files, for example their history buffer. If that's the sandbox used to run commands, those commands could also do those things. There are also infinite possible shell setups, we couldn't possibly support everything.
HomyeeKing commentedon Jan 6, 2026
Daniel Imms (@Tyriar) Do you mean to use shell hooks function like
precmdto create sandbox withsandbox-execevery time?Tyriar commentedon Jan 6, 2026
Homyee King ホミイ (@HomyeeKing) shell hooks aren't available across the board, plus I'd prefer to lean in the direction of transparency than obfuscation personally.