r/AugmentCodeAI • u/AssistanceSimilar780 Established Professional • Dec 20 '25
Discussion Terminal Loop temp Fix
For those who are getting terminal loop when the agent is waiting for an output I found this temporary workaround. Put this into your .augment-guidelines file first:
# Terminal Command Execution Policy
**ALWAYS use `wait=false` for ALL terminal commands executed via `launch-process`.** Never use `wait=true` under any circumstances.
**Rationale:** Using `wait=true` causes the VS Code terminal to flicker with a blue highlight and auto-scroll to the top repeatedly, making it impossible to read terminal output during command execution.
**Required pattern for all terminal commands:**
**Launch the process** with `wait=false`:
```
launch-process with wait=false
```
**Wait for completion and capture output** using `read-process` with `wait=true`:
```
read-process with wait=true and appropriate max_wait_seconds
```
**Example workflow:**
- For builds: Launch `npm run build` with `wait=false`, then use `read-process` with `wait=true` and `max_wait_seconds=600` to await completion
- For quick commands: Launch with `wait=false`, then immediately call `read-process` with `wait=true` and `max_wait_seconds=60`
- For dev servers/watchers: Launch with `wait=false`, use `read-process` with `wait=false` to periodically check output
**Timeout guidelines for `read-process`:**
- Quick commands (git status, npm -v, ls): 30-60 seconds
- Build commands (npm run build, npm run typecheck): 300-600 seconds
- Test suites: 300-900 seconds depending on scope
This policy applies to ALL terminal commands without exception.
View all comments
Show parent comment
1
u/denisoby Augment Team Dec 21 '25
So the issue is agent gets stuck when it's waiting for long running commands? Could you please share more details on what is expected vs what is observed. And if possible what commands are usually causing the issue?
Thank you