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
In sandbox commands like flutter test / flutter analyze have no respond #15038
What terminal emulator and version are you using (if applicable)?
VSCode
What issue are you seeing?
In Codex CLI sandbox mode, Flutter verification commands are not reliably executable, which blocks normal fix -> verify loops in Flutter repos.
What steps can reproduce the bug?
Open a Flutter project in Codex CLI (sandboxed environment).
Ask Codex to run flutter test or flutter analyze.
Observe that these commands are not reliably runnable in this sandbox workflow.
What is the expected behavior?
Codex CLI should be able to run standard Flutter validation commands in sandbox mode, same as other normal CLI checks.
Additional information
Please provide stable sandbox support for Flutter toolchain verification commands (flutter test, flutter analyze), or a documented Flutter-capable sandbox profile.
changed the title [-]In sandbox run flutter test / flutter analyze would have no respond[/-][+]In sandbox commands like flutter test / flutter analyze have no respond[/+]on Mar 18, 2026
The tool you're using likely needs some resource that is not available by policy in the sandbox. You'll need to determine what resource that is and configure the sandbox policy accordingly if you want it to run in the sandbox. Some tool maintainers have updated their tools to work better inside of agentic coding sandboxes. You might want to report the issue to the tool maintainer.
I'm experiencing the same problem. I'm using the codex vscode extension on windows and it cannot run flutter/dart commands without hanging indefinitely.
I end up having to run the commands myself and provide the outputs to codex.
I got around this by adding a context rule to codex. I have .agent/rules directory in my workspace (that I always reference with each new codex session) with a flutter_rules.md file where I added the following:
## Flutter and Dart Command Execution
In this Windows setup, `flutter` and `dart` commands should be run outside the sandbox.
Reason:
- the Flutter SDK lives outside the workspace under `C:\path\to\user\.flutter\flutter`
- Flutter startup needs access to SDK Git metadata and writes to the SDK cache under `bin\cache`
- sandboxed runs may hang or fail because that location is not fully accessible/writable inside the sandbox
Policy:
- do not tell the user to run routine `flutter` or `dart` commands manually just because they are outside the sandbox
- request an approval to run them outside the sandbox and execute them directly once approved
- when possible, use a persistent prefix approval for `flutter` and `dart`
- if permission has not yet been granted, trigger an approval request instead of stopping at instructions only
Codex will prompt me to allow running flutter and dart commands outside the sandbox for the first time and then I'll allow for the current session. With this It can run the flutter/dart commands without hanging.
I did not find a way to explicitly allow certain commands to run outside the sandbox and if possible it would be great to know how to do this.
As of now this is the solution I found with the help of Codex 😅
Reacted by Lucas Machado, aliabudahesh, Tipertuba, Robin Marcelo, Paul Dhaliwal, HaiBo Yin, Joonas Malinen, moodstubos, Darren Trebbly, Stefan Meier and 2 more
I’m seeing a similar issue on Windows in my multi-repo VS Code workspace with the Codex extension, where common Flutter/Dart commands can either hang indefinitely or fail inside the Codex sandbox.
Environment:
Codex CLI: 0.142.0-alpha.6
VS Code extension: openai.chatgpt-26.616.51431-win32-x64
Windows: 10.0.26200
Flutter: 3.44.2 stable
Dart: 3.12.2
Flutter SDK: <USERPROFILE>\flutter
Codex config: [windows] sandbox = "elevated"
Inside the Codex Windows sandbox, bare Flutter command lookup is unreliable.
For example, flutter --version can fail with:
The term 'flutter' is not recognized as a name of a cmdlet, function, script file, or executable program.
This happens even though PATH contains <USERPROFILE>\flutter\bin.
The same command works in the normal VS Code terminal, and it also works when run outside the Codex sandbox. Inside the sandbox, absolute path execution works:
& <USERPROFILE>\flutter\bin\flutter.bat --version
flutter analyze --no-pub also works across multiple Flutter repos when invoked via absolute path and explicit working directory.
So this looks like an issue with Codex’s native Windows sandbox command resolution and/or .bat handling for Flutter tooling, rather than a broken Flutter install or repo-specific problem.
Before switching from unelevated to elevated sandbox, Flutter commands could often hang/no-response. After switching to elevated, the full hangs were harder to reproduce, but bare flutter lookups inside the sandbox are still unreliable.
Current workaround: use <USERPROFILE>\flutter\bin\flutter.bat directly, or a wrapper that resolves Flutter explicitly and kills the child process tree on timeout.
Attempted debug and report summary generated with 5.5
I had success adding this modified version to the AGENTS.md on Windows 11.
## Flutter and Dart Command Execution
In this setup, the `flutter` and `dart` commands should be run outside the sandbox.
Reason:
- Flutter startup needs access to SDK Git metadata and writes to its own SDK cache.
- Sandboxed runs may hang or fail because that location is not fully accessible/writable inside the sandbox.
Policy:
- Do not tell the user to run routine `flutter` or `dart` commands manually just because they are outside the sandbox.
- Request an approval to run them outside the sandbox and execute them directly once approved.
- When possible, use a persistent prefix approval for `flutter` and `dart`.
- If permission has not yet been granted, trigger an approval request instead of stopping at instructions only.
I had success adding this modified version to the AGENTS.md on Windows 11.
## Flutter and Dart Command Execution
In this setup, the `flutter` and `dart` commands should be run outside the sandbox.
Reason:
- Flutter startup needs access to SDK Git metadata and writes to its own SDK cache.
- Sandboxed runs may hang or fail because that location is not fully accessible/writable inside the sandbox.
Policy:
- Do not tell the user to run routine `flutter` or `dart` commands manually just because they are outside the sandbox.
- Request an approval to run them outside the sandbox and execute them directly once approved.
- When possible, use a persistent prefix approval for `flutter` and `dart`.
- If permission has not yet been granted, trigger an approval request instead of stopping at instructions only.
An easy solution for me was to add
the flutter install folder and the pub cache C:/Users/<user>/AppData/Local/Pub/Cache to writable_roots in codex config.toml.
I also added 2 rules to .codex/rules/default.rules.
Activity
[-]In sandbox run flutter test / flutter analyze would have no respond[/-][+]In sandbox commands like flutter test / flutter analyze have no respond[/+]github-actions commentedon Mar 18, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
wxzhuhua commentedon Mar 18, 2026
No duplicate found.
etraut-openai commentedon Mar 18, 2026
The tool you're using likely needs some resource that is not available by policy in the sandbox. You'll need to determine what resource that is and configure the sandbox policy accordingly if you want it to run in the sandbox. Some tool maintainers have updated their tools to work better inside of agentic coding sandboxes. You might want to report the issue to the tool maintainer.
AndreSensaway commentedon Apr 9, 2026
I'm experiencing the same problem. I'm using the codex vscode extension on windows and it cannot run flutter/dart commands without hanging indefinitely.
I end up having to run the commands myself and provide the outputs to codex.
AndreSensaway commentedon Apr 9, 2026
I got around this by adding a context rule to codex. I have
.agent/rulesdirectory in my workspace (that I always reference with each new codex session) with aflutter_rules.mdfile where I added the following:Codex will prompt me to allow running flutter and dart commands outside the sandbox for the first time and then I'll allow for the current session. With this It can run the flutter/dart commands without hanging.
I did not find a way to explicitly allow certain commands to run outside the sandbox and if possible it would be great to know how to do this.
As of now this is the solution I found with the help of Codex 😅
leehayward92 commentedon Jun 22, 2026
I’m seeing a similar issue on Windows in my multi-repo VS Code workspace with the Codex extension, where common Flutter/Dart commands can either hang indefinitely or fail inside the Codex sandbox.
Environment:
0.142.0-alpha.6openai.chatgpt-26.616.51431-win32-x6410.0.262003.44.2 stable3.12.2<USERPROFILE>\flutter[windows] sandbox = "elevated"Inside the Codex Windows sandbox, bare Flutter command lookup is unreliable.
For example,
flutter --versioncan fail with:The term 'flutter' is not recognized as a name of a cmdlet, function, script file, or executable program.This happens even though
PATHcontains<USERPROFILE>\flutter\bin.The same command works in the normal VS Code terminal, and it also works when run outside the Codex sandbox. Inside the sandbox, absolute path execution works:
& <USERPROFILE>\flutter\bin\flutter.bat --versionflutter analyze --no-pubalso works across multiple Flutter repos when invoked via absolute path and explicit working directory.So this looks like an issue with Codex’s native Windows sandbox command resolution and/or
.bathandling for Flutter tooling, rather than a broken Flutter install or repo-specific problem.Before switching from
unelevatedtoelevatedsandbox, Flutter commands could often hang/no-response. After switching toelevated, the full hangs were harder to reproduce, but bareflutterlookups inside the sandbox are still unreliable.Current workaround: use
<USERPROFILE>\flutter\bin\flutter.batdirectly, or a wrapper that resolves Flutter explicitly and kills the child process tree on timeout.27labs commentedon Jun 28, 2026
I had success adding this modified version to the AGENTS.md on Windows 11.
caio-pellegrini commentedon Jul 3, 2026
Thanks! It worked for me.
derteufelqwe commentedon Sep 26, 2026
An easy solution for me was to add
the flutter install folder and the pub cache
C:/Users/<user>/AppData/Local/Pub/Cachetowritable_rootsin codexconfig.toml.I also added 2 rules to
.codex/rules/default.rules.With this setup codex is able to run all flutter and dart commands without asking for permissions.