Choosing a Permission Mode
Different tasks require different levels of autonomy: you may want complete supervision for sensitive work, minimal interruption for long-running refactors, or read-only access when exploring a codebase.
You can switch modes at any time during a session.
Available Modes
Each mode makes different trade-offs between convenience and supervision. Choose the mode that matches your task.
| Mode | What Tuanjie AI can do without asking | Best for |
|---|---|---|
ask before edits | Read and edit files, except protected directories | Iterating on code you're reviewing |
plan | Read files | Exploring a codebase, planning refactors |
yolo | Automatically edit files, automatically run commands | Hands-off long-running tasks |
edit automatically | Automatically edit files, shell commands need confirmation | Long-running tasks needing supervision |
Regardless of which mode you use, writes to .git and .vscode are never automatically approved.
Ask before edits
Core Behavior:
Codely must ask for confirmation before executing any tool. Any operation that modifies files or state requires explicit approval first. Codely cannot make changes on its own.
Use Cases and Best Practices
Suitable scenarios:
- Personal local projects, private code. Prevents the AI from modifying core configurations, keys, database settings, or environment variables—accidental changes could break the project.
- Production code / business projects. Rigorous development where every file modification is manually verified to avoid logic vulnerabilities and deployment risks.
- Collaborative repositories, Git-hosted projects. Prevents the AI from modifying commit messages, branch configurations, or dependency versions, which could break team conventions.
- Sensitive file operations.
.envfiles, configuration files, permission scripts, server deployment scripts, database scripts. - Beginners or users concerned about accidental deletion or modification. If you don't fully understand the code logic, manual confirmation of every change prevents accidental data or file loss.
- Debugging and troubleshooting. Modify code step by step, checking effects as you go—no batch or automatic changes allowed.
- Projects with strict custom constraints. Enforced code formatting, comments, and directory structure, where only compliant modifications are manually approved.
Starting and Using Ask before edits Mode
Ask before edits is the default mode. When you're in another mode, press Shift+Tab to cycle through permission modes until you reach Ask before edits mode.
Plan
Plan mode tells Tuanjie AI to research and propose changes without making them. Tuanjie AI reads files, runs shell commands for exploration, asks clarifying questions, and writes plan files, but doesn't edit your source code. Permission prompts work the same as in default mode: you still approve Bash commands, network requests, and other operations that would normally prompt.
When to Use Plan Mode
Plan mode is useful when you want Tuanjie AI to research and propose an approach before making changes:
Multi-step implementation: When a feature requires edits across multiple files Code exploration: When you want to study the codebase before changing anything Interactive development: When you want to iterate on your approach with Tuanjie AI
Starting and Using Plan Mode
Cycle through permission modes by pressing Shift+Tab until you reach Plan mode.
This example starts a planning session for a complex refactor:
I need to refactor our authentication system to use OAuth2. Create a detailed migration plan.
Tuanjie AI analyzes the current implementation and creates a plan. Use follow-up questions to refine it:
What about backward compatibility?
How should we handle database migration?
When the plan is ready, Tuanjie AI presents it and asks how to proceed. From there you can:
- Approve and start in auto mode
- Approve and accept edits
- Approve and manually review each edit
- Continue planning, sending your feedback to Tuanjie AI for another round
Each approval option also lets you clear the planning context first.
Yolo
Core Features
No confirmation prompts: Modify files, run commands, write code — all executed directly. Fully automated pipeline: Planning → Coding → Verification → Fixing → Deployment, all automatic. Ultra-fast delivery: Skip manual review — no waiting, no bottlenecks. High risk: Errors take effect immediately, potentially breaking code or systems. Controllable rules: Skip planning, set verification levels, and configure handover conditions.
When to Use Yolo Mode
- Rapid prototype development: Small projects, demos, test scripts.
- Batch code refactoring: Modifications across multiple files with automatic fixes.
- Automated deployment / CI/CD: One-click build, test, and publish.
- Familiar, safe projects: You fully trust the codebase, have version control, and can roll back.
- Experimentation / research: Rapid trial and error, iteration, and validating ideas.
When Not to Use Yolo Mode
- Production environments, critical systems (too risky).
- Beginners or those unfamiliar with the codebase (prone to unintended changes).
- Scenarios requiring strict review and compliance.
Edit automatically
Blocked by Default:
- Downloading and executing code, such as
curl | bashor scripts from cloned repositories - Sending sensitive data to external endpoints
- Production deployment and migrations
- Irreversibly destroying files that existed before the session started
- Destructive source control operations, like force pushing or directly pushing to
main
Allowed by Default:
- Local file operations in the working directory
- Installing dependencies already declared in your lockfile or manifest
- Reading
.envand sending credentials to its matching APIs - Read-only HTTP requests
- Pushing to branches you started or branches created by Tuanjie AI
Starting and Using Edit automatically Mode
Cycle through permission modes by pressing Shift+Tab until you reach Edit automatically mode.
Further Customizing Permissions
Permission modes set baseline approval behavior. For control over individual tools or commands, layer additional configuration on top of the active mode. Add allow, ask, or deny entries to your settings file to pre-approve safe commands, force prompts for risky commands, or block specific tools entirely. Rules apply in every mode except bypassPermissions and match by tool name and parameter patterns.