Skip to content

Sandboxing terminal while running commands through agent. #277286

Closed

Description

This is part of broader feature to sandbox agent execution.

This issue is scoped to sandboxing terminal while running commands through copilot chat extension.

OS: Mac OS and Linux

Activity

  1. changed the title [-]Sandboxing terminal commands from agent execution[/-] [+]Sandboxing terminal while running commands through agent.[/+] on Nov 17, 2025
  2. added
    feature-request
    on Dec 8, 2025
  3. added
    terminal
    on Dec 8, 2025
  4. HomyeeKing commented on Jan 5, 2026

    @HomyeeKing

    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.

  5. Tyriar commented on Jan 5, 2026

    @Tyriar
    Contributor

    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

  6. HomyeeKing commented on Jan 5, 2026

    @HomyeeKing

    Daniel Imms (@Tyriar) What kind of break? Cursor has already used sandbox-exec in production

  7. Tyriar commented on Jan 5, 2026

    @Tyriar
    Contributor

    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.

  8. HomyeeKing commented on Jan 6, 2026

    @HomyeeKing

    so the current plan is to sandbox each command that's run within the shell

    Daniel Imms (@Tyriar) Do you mean to use shell hooks function like precmd to create sandbox with sandbox-exec every time?

  9. Tyriar commented on Jan 6, 2026

    @Tyriar
    Contributor

    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.

  10. added
    unreleased
    insiders-released
    and removed
    unreleased
    on Jan 16, 2026
  11. locked and limited conversation to collaborators on Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requestinsiders-releasedon-testplanterminal

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions