Example finding How it works Coverage PENTEST METHODOLOGY DOCS PRICING FAQ MCP CONTACT LOG IN SIGN UP →

Trae agent keeps running: what to check

Trae Auto-Run controls whether commands and MCP tools need repeated approval. It is not a documented guarantee that the agent will keep working until you manually stop it. If your agent keeps running unexpectedly, first distinguish an active conversation from a terminal process it launched.

This troubleshooting procedure is based on the documented controls and general development diagnostics. It is not a reproduction of a confirmed Trae bug or a promise about a particular version’s cancellation behavior.

Want the agent to continue without repeated approvals?

The official Auto-Run documentation places the controls under Settings → Conversation → Auto-Run, with separate configuration for IDE and SOLO. It describes automatic MCP execution and command execution. It also states that automatically run commands execute outside the sandbox and warns about bypassing safety checks.

Review the control for the mode you are actually using. If your installed version has different labels, consult its documentation before changing the setting. Enable only the access the task needs; unattended command approval gives tools more freedom, not a reliable completion condition.

For a bounded task, give the agent a concrete endpoint. Here is an example task instruction, not a Trae configuration option:

Fix the failing signup validation test.
Run that test after the edit and report the result.
If the same error remains after two attempts, stop and explain it.
Do not start a development server or a test watcher.
Do not deploy or change credentials.

A prompt communicates intent. Use the actual permission controls to restrict sensitive actions.

Is the agent working, looping, or waiting?

Inspect the last action and its output before restarting anything.

What you see Diagnostic check Suggested next step
Repeated edits followed by the same failure Compare the error and diff across attempts. Cancel the task and ask for a diagnosis of that specific error.
A terminal says a server is listening Check whether the command starts a development server. Leave it running only if you need the server; do not treat it as a finishing test.
Tests finish but the command remains open Look for watch mode in the script definition. Use the test runner’s documented single-run command.
No new output Inspect the terminal for an input prompt or a pending tool approval. Resolve the specific wait before retrying the task.
A remote tool was invoked Check that tool’s job status. Cancel the remote job through its own controls if needed.

These are diagnostic possibilities, not verified explanations for every Trae session.

Stop the task and verify what remains

Use the current session’s stop or cancel control. Then check the terminal separately. If the command remains active in a terminal you control, interrupt that specific foreground command, usually with Ctrl+C. If it ignores the interrupt, inspect the process and stop only the process belonging to this task.

Cancellation cannot undo a completed file edit or a submitted remote operation. Review the working tree and any external jobs before continuing. Avoid killing every process with the same runtime name: another project may use it too.

For a local Git project, these read-only commands help inspect the result:

git status --short
git diff --stat
git diff

Do not discard the whole working tree to recover from an agent loop. Separate your existing edits from the task’s changes first.

If it happens again

Record the Trae version, IDE or SOLO mode, relevant Auto-Run settings, the exact command, and the last visible action. Try a small disposable project with a finite task. Compare whether the problem follows that command or also occurs with a command that exits immediately.

A useful bug report explains what should have ended, what remained active, and whether cancellation stopped the conversation, the terminal, or neither. Remove secrets and private source code before sharing logs.

Continue with the Trae security configuration guide and production security checklist.

Documentation reviewed October 8, 2026. Control labels and behavior can vary by release.

Review what the agent shipped

After reviewing the code changes, test the deployed app for exposed credentials and missing access controls.

14-day free trial · No credit card · Cancel anytime

SCAN YOUR APP →