@maincode-ai/matilda-code 0.21.13 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chunks/agent-IUINB66G.js +3 -0
- package/chunks/agent-headless-YA2RKYEZ.js +3 -0
- package/chunks/{askUserQuestion-BNSWGD26.js → askUserQuestion-RZYBOPLR.js} +3 -3
- package/chunks/ca-JKEHLTNL.js +23 -0
- package/chunks/chunk-225CZWD7.js +89 -0
- package/chunks/{chunk-MEV5XQI2.js → chunk-2XSB5XHX.js} +1 -1
- package/chunks/chunk-453BANK3.js +8 -0
- package/chunks/{chunk-6M5G5FBH.js → chunk-4UGPARBR.js} +1 -1
- package/chunks/{chunk-RNKDFE2S.js → chunk-5B2QERWR.js} +1 -1
- package/chunks/chunk-5ETLURI6.js +3 -0
- package/chunks/chunk-6NXVLJ3X.js +56 -0
- package/chunks/{chunk-QZI2ZGZY.js → chunk-7B65UIHB.js} +1 -1
- package/chunks/{chunk-27Q5KW3A.js → chunk-7E2YCGHS.js} +13 -13
- package/chunks/{chunk-DHDD5YJC.js → chunk-ARAB5QTM.js} +69 -69
- package/chunks/chunk-DUB7JMQV.js +13 -0
- package/chunks/chunk-G3F3ZCH2.js +9 -0
- package/chunks/chunk-GT6MSEK4.js +3 -0
- package/chunks/chunk-HEJO7OBH.js +3 -0
- package/chunks/{chunk-6T2GIM76.js → chunk-IHWAOFCQ.js} +1 -1
- package/chunks/chunk-ILHNCXBC.js +8 -0
- package/chunks/chunk-J3ZCE3TA.js +8 -0
- package/chunks/{chunk-AOOZREGV.js → chunk-LBQNFSZ2.js} +1 -1
- package/chunks/{chunk-5OHGYMKP.js → chunk-LM6OIN4B.js} +1 -1
- package/chunks/{chunk-EZDV7A76.js → chunk-LMZBADPW.js} +1 -1
- package/chunks/chunk-MGRXOZAG.js +8 -0
- package/chunks/chunk-NBLBE7PE.js +2609 -0
- package/chunks/chunk-POGNX7U3.js +31 -0
- package/chunks/chunk-PQZ6HKKW.js +80 -0
- package/chunks/chunk-QXSBPCBA.js +8 -0
- package/chunks/chunk-RHSUTILA.js +9 -0
- package/chunks/{chunk-P5TG5CON.js → chunk-RPXRN7E6.js} +1 -1
- package/chunks/chunk-TUKNB5CQ.js +33 -0
- package/chunks/chunk-UM6CLO7D.js +7 -0
- package/chunks/chunk-V2VUANFI.js +120 -0
- package/chunks/chunk-V4VILMIK.js +14 -0
- package/chunks/chunk-ZSGBDQXU.js +11 -0
- package/chunks/{computer-use-J4GAM4M6.js → computer-use-PBCWDTJR.js} +1 -1
- package/chunks/{cron-create-IDWSZENI.js → cron-create-PHQ43NYA.js} +1 -1
- package/chunks/cron-delete-7RCQIU2U.js +3 -0
- package/chunks/cron-list-KKNLLMNN.js +5 -0
- package/chunks/de-GMGNR5CZ.js +23 -0
- package/chunks/{devtools-XRQ4YJ5S.js → devtools-7YNCRYZV.js} +1 -1
- package/chunks/{chunk-OOEH6ZSV.js → dist-UWUWLWTO.js} +2 -2
- package/chunks/{edit-X2S2ZXRN.js → edit-ELHNQB5E.js} +1 -1
- package/chunks/en-3NQMLVKW.js +23 -0
- package/chunks/{enter-worktree-TUCGNCLO.js → enter-worktree-UZIBOBV3.js} +1 -1
- package/chunks/enterPlanMode-UHY3DZXE.js +18 -0
- package/chunks/{exit-worktree-7FLITFZI.js → exit-worktree-HLG4PDMX.js} +1 -1
- package/chunks/{exitPlanMode-O5UUJ3GM.js → exitPlanMode-V4HYNH3J.js} +2 -2
- package/chunks/fr-WS3EBB36.js +23 -0
- package/chunks/{getMachineId-bsd-ZYBNK2JG.js → getMachineId-bsd-ETKQTB6C.js} +1 -1
- package/chunks/{getMachineId-darwin-CM2MQGUI.js → getMachineId-darwin-AKNRWOWB.js} +1 -1
- package/chunks/{getMachineId-linux-SYE2KMCW.js → getMachineId-linux-2QSD7FTP.js} +1 -1
- package/chunks/{getMachineId-unsupported-6IHVG2XO.js → getMachineId-unsupported-UXSV7I24.js} +1 -1
- package/chunks/{getMachineId-win-S3J3JSUM.js → getMachineId-win-4MTFXGP3.js} +1 -1
- package/chunks/glob-C5CTWXLP.js +22 -0
- package/chunks/{goal-tools-YQOA6OKU.js → goal-tools-BGIWEJ3K.js} +3 -3
- package/chunks/{grep-VAB2VSXM.js → grep-BEFTGKHW.js} +1 -1
- package/chunks/ja-GBCDQ43R.js +23 -0
- package/chunks/keychain-token-storage-FEJZYJBB.js +3 -0
- package/chunks/ls-XH55NAD3.js +15 -0
- package/chunks/{lsp-NGLDRHZU.js → lsp-BKDCR37G.js} +1 -1
- package/chunks/mcp-client-GAQG7MCT.js +3 -0
- package/chunks/monitor-NSVUUKCM.js +32 -0
- package/chunks/{multipart-parser-JI75T2O5.js → multipart-parser-FKHYAVGR.js} +1 -1
- package/chunks/notebook-edit-AXKYC64C.js +17 -0
- package/chunks/openaiContentGenerator-66YY6CIM.js +47 -0
- package/chunks/pt-VID6J2CM.js +23 -0
- package/chunks/read-file-YFJMLS7V.js +3 -0
- package/chunks/ripGrep-BEHEB23R.js +3 -0
- package/chunks/ru-EB6V6EAN.js +23 -0
- package/chunks/scheduler-GKQOREMS.js +8 -0
- package/chunks/send-message-GJSEMAZB.js +8 -0
- package/chunks/shell-J5Q2UEXH.js +3 -0
- package/chunks/{skill-ETQM5NI3.js → skill-3RWNSUNE.js} +1 -1
- package/chunks/src-LZEU4AYF.js +5 -0
- package/chunks/symbol-search-4VM6J5Y4.js +19 -0
- package/chunks/{syntheticOutput-WZDPECYS.js → syntheticOutput-O7LEF3AM.js} +1 -1
- package/chunks/task-create-N4IRJBTF.js +3 -0
- package/chunks/{task-detach-TBAVUOTC.js → task-detach-RGNQUX3H.js} +1 -1
- package/chunks/task-list-Z7JUB4QK.js +9 -0
- package/chunks/{task-stop-HDSARSJ6.js → task-stop-L2OWK2PJ.js} +1 -1
- package/chunks/{task-update-MW2VT2XV.js → task-update-H5AXVXDS.js} +1 -1
- package/chunks/{team-create-VMYNLZCC.js → team-create-FWTIQ2FT.js} +2 -2
- package/chunks/team-delete-D45ALROH.js +8 -0
- package/chunks/todoWrite-LCQOQBI7.js +3 -0
- package/chunks/{tool-search-WX6FOE35.js → tool-search-X6UUCSPU.js} +1 -1
- package/chunks/{web-fetch-CKYBHGLF.js → web-fetch-244KUWSX.js} +17 -17
- package/chunks/web-search-YRZ3BZ3X.js +26 -0
- package/chunks/{workflow-WBSRQG3N.js → workflow-EP4AFR24.js} +2 -2
- package/chunks/write-file-EXWGRN4Q.js +15 -0
- package/cli.js +641 -678
- package/examples/starter/README.md +0 -3
- package/locales/ca.js +3 -87
- package/locales/de.js +3 -91
- package/locales/en.js +3 -91
- package/locales/fr.js +3 -88
- package/locales/ja.js +3 -92
- package/locales/pt.js +3 -92
- package/locales/ru.js +3 -91
- package/package.json +2 -2
- package/sandbox-macos-permissive-proxied.sb +1 -1
- package/sandbox-macos-restrictive-closed.sb +14 -1
- package/sandbox-macos-restrictive-open.sb +14 -1
- package/sandbox-macos-restrictive-proxied.sb +15 -2
- package/bundled/mainy/SKILL.md +0 -157
- package/bundled/mainy/docs/_meta.ts +0 -32
- package/bundled/mainy/docs/common-workflow.md +0 -571
- package/bundled/mainy/docs/configuration/_meta.ts +0 -7
- package/bundled/mainy/docs/configuration/auth.md +0 -82
- package/bundled/mainy/docs/configuration/matilda-ignore.md +0 -55
- package/bundled/mainy/docs/configuration/model-providers.md +0 -516
- package/bundled/mainy/docs/configuration/settings.md +0 -818
- package/bundled/mainy/docs/configuration/themes.md +0 -199
- package/bundled/mainy/docs/configuration/trusted-folders.md +0 -67
- package/bundled/mainy/docs/extension/_meta.ts +0 -9
- package/bundled/mainy/docs/extension/extension-releasing.md +0 -204
- package/bundled/mainy/docs/extension/getting-started-extensions.md +0 -299
- package/bundled/mainy/docs/extension/introduction.md +0 -338
- package/bundled/mainy/docs/features/_meta.ts +0 -27
- package/bundled/mainy/docs/features/approval-mode.md +0 -388
- package/bundled/mainy/docs/features/arena.md +0 -219
- package/bundled/mainy/docs/features/auto-mode.md +0 -308
- package/bundled/mainy/docs/features/channels/_meta.ts +0 -5
- package/bundled/mainy/docs/features/channels/overview.md +0 -328
- package/bundled/mainy/docs/features/channels/plugins.md +0 -87
- package/bundled/mainy/docs/features/channels/telegram.md +0 -120
- package/bundled/mainy/docs/features/code-review.md +0 -291
- package/bundled/mainy/docs/features/commands.md +0 -528
- package/bundled/mainy/docs/features/dual-output.md +0 -627
- package/bundled/mainy/docs/features/followup-suggestions.md +0 -109
- package/bundled/mainy/docs/features/headless.md +0 -448
- package/bundled/mainy/docs/features/hooks.md +0 -1308
- package/bundled/mainy/docs/features/language.md +0 -144
- package/bundled/mainy/docs/features/lsp.md +0 -496
- package/bundled/mainy/docs/features/markdown-rendering.md +0 -183
- package/bundled/mainy/docs/features/mcp.md +0 -423
- package/bundled/mainy/docs/features/memory.md +0 -185
- package/bundled/mainy/docs/features/sandbox.md +0 -249
- package/bundled/mainy/docs/features/scheduled-tasks.md +0 -139
- package/bundled/mainy/docs/features/skills.md +0 -347
- package/bundled/mainy/docs/features/status-line.md +0 -397
- package/bundled/mainy/docs/features/structured-output.md +0 -309
- package/bundled/mainy/docs/features/sub-agents.md +0 -737
- package/bundled/mainy/docs/features/tips.md +0 -54
- package/bundled/mainy/docs/features/token-caching.md +0 -29
- package/bundled/mainy/docs/features/tool-use-summaries.md +0 -178
- package/bundled/mainy/docs/features/worktree.md +0 -343
- package/bundled/mainy/docs/ide-integration/_meta.ts +0 -4
- package/bundled/mainy/docs/ide-integration/ide-companion-spec.md +0 -182
- package/bundled/mainy/docs/ide-integration/ide-integration.md +0 -144
- package/bundled/mainy/docs/integration-github-action.md +0 -241
- package/bundled/mainy/docs/integration-jetbrains.md +0 -81
- package/bundled/mainy/docs/integration-vscode.md +0 -39
- package/bundled/mainy/docs/integration-zed.md +0 -72
- package/bundled/mainy/docs/matilda-serve-deploy-local.md +0 -221
- package/bundled/mainy/docs/matilda-serve.md +0 -661
- package/bundled/mainy/docs/overview.md +0 -64
- package/bundled/mainy/docs/quickstart.md +0 -234
- package/bundled/mainy/docs/reference/_meta.ts +0 -3
- package/bundled/mainy/docs/reference/keyboard-shortcuts.md +0 -91
- package/bundled/mainy/docs/support/Uninstall.md +0 -65
- package/bundled/mainy/docs/support/_meta.ts +0 -6
- package/bundled/mainy/docs/support/tos-privacy.md +0 -94
- package/bundled/mainy/docs/support/troubleshooting.md +0 -127
- package/chunks/agent-SRAIVZEE.js +0 -3
- package/chunks/agent-headless-XRDOZESG.js +0 -3
- package/chunks/anthropicContentGenerator-LLDIKDMQ.js +0 -39
- package/chunks/ca-NPYL24ME.js +0 -25
- package/chunks/chunk-27HUYW23.js +0 -22
- package/chunks/chunk-2HTPVSGT.js +0 -3
- package/chunks/chunk-3B2HABK7.js +0 -30
- package/chunks/chunk-3MTZTNAU.js +0 -101
- package/chunks/chunk-3YLXGE6T.js +0 -8
- package/chunks/chunk-47XR7IMP.js +0 -8
- package/chunks/chunk-4F4DA5UI.js +0 -8
- package/chunks/chunk-4Q2SNBUH.js +0 -18
- package/chunks/chunk-6EQMZNIY.js +0 -8
- package/chunks/chunk-6I6VGTKD.js +0 -8
- package/chunks/chunk-DC7LAFZZ.js +0 -8
- package/chunks/chunk-DE3HKC2W.js +0 -9
- package/chunks/chunk-FWDMPRKU.js +0 -3
- package/chunks/chunk-G7R2XEEF.js +0 -7
- package/chunks/chunk-GOJCMVJJ.js +0 -8
- package/chunks/chunk-GTVCJCHR.js +0 -8
- package/chunks/chunk-IJEGHQ7Z.js +0 -32
- package/chunks/chunk-JCE3JAVC.js +0 -25
- package/chunks/chunk-KHHJYBR5.js +0 -9
- package/chunks/chunk-LUNDTQ3G.js +0 -8
- package/chunks/chunk-LWARA7JY.js +0 -37
- package/chunks/chunk-M53RP3YP.js +0 -31
- package/chunks/chunk-MTMU7JYZ.js +0 -11
- package/chunks/chunk-O44XK65C.js +0 -8
- package/chunks/chunk-OA56BXPD.js +0 -3
- package/chunks/chunk-PEKAUGYV.js +0 -2621
- package/chunks/chunk-PGUG43HG.js +0 -24
- package/chunks/chunk-PGXQZVLX.js +0 -8
- package/chunks/chunk-QKYGQLWC.js +0 -8
- package/chunks/chunk-QN6Y6NPA.js +0 -3
- package/chunks/chunk-RI54U73U.js +0 -56
- package/chunks/chunk-RPFSFS7Z.js +0 -39
- package/chunks/chunk-SDTWBD62.js +0 -8
- package/chunks/chunk-SOEIVSM5.js +0 -113
- package/chunks/chunk-SVSY6AWS.js +0 -59
- package/chunks/chunk-T2T2UEPY.js +0 -4
- package/chunks/chunk-TISQNFB5.js +0 -3
- package/chunks/chunk-TWJLOEAI.js +0 -31
- package/chunks/chunk-VI74YQQO.js +0 -8
- package/chunks/chunk-VYZOOSMP.js +0 -30
- package/chunks/chunk-W4QSMIWO.js +0 -9
- package/chunks/chunk-WC2VTVCE.js +0 -27
- package/chunks/chunk-YV3PUOBU.js +0 -65
- package/chunks/chunk-ZX34M2GF.js +0 -14
- package/chunks/contextCommand-5F5M7NA4.js +0 -3
- package/chunks/cron-delete-NQCDZDUI.js +0 -3
- package/chunks/cron-list-Z4XMC3TO.js +0 -5
- package/chunks/de-34YZHGC6.js +0 -25
- package/chunks/dist-7UYRLSLE.js +0 -3
- package/chunks/dist-PH6JW7XD.js +0 -42
- package/chunks/en-QLGMD6OS.js +0 -25
- package/chunks/enterPlanMode-SQEZAAIR.js +0 -18
- package/chunks/fileFromPath-7UCWPD4W.js +0 -3
- package/chunks/fr-EDNBQACJ.js +0 -25
- package/chunks/geminiContentGenerator-FIZFLPU3.js +0 -8
- package/chunks/glob-GSFTYAS2.js +0 -22
- package/chunks/ja-LV4RLM3M.js +0 -25
- package/chunks/keychain-token-storage-KQK6MNOJ.js +0 -3
- package/chunks/ls-IZJ3CKZY.js +0 -15
- package/chunks/matildaAgentContentGenerator-QQHPCFJ5.js +0 -8
- package/chunks/matildaContentGenerator-W7Z33ONU.js +0 -8
- package/chunks/matildaOAuth2-7COTQQR2.js +0 -3
- package/chunks/mcp-client-DXUNIEIB.js +0 -3
- package/chunks/monitor-4PFIGAGG.js +0 -32
- package/chunks/notebook-edit-MWJYAATJ.js +0 -17
- package/chunks/openaiContentGenerator-NDVJL6QL.js +0 -3
- package/chunks/pt-5SQ4DGL7.js +0 -25
- package/chunks/read-file-WPZKPXWA.js +0 -3
- package/chunks/ripGrep-7LZDZFTX.js +0 -3
- package/chunks/ru-7K24S53N.js +0 -25
- package/chunks/scheduler-DK2MVKXX.js +0 -8
- package/chunks/send-message-TCPX5UDU.js +0 -8
- package/chunks/serve-GSZPJI2O.js +0 -1026
- package/chunks/shell-PRS47PDP.js +0 -3
- package/chunks/src-UB7DZRYK.js +0 -3
- package/chunks/src-WZTRMETQ.js +0 -5
- package/chunks/symbol-search-HARHZ5AH.js +0 -19
- package/chunks/task-create-XRNIDT4T.js +0 -3
- package/chunks/task-list-Z6BDZZID.js +0 -9
- package/chunks/team-delete-F7QDC2TE.js +0 -8
- package/chunks/todoWrite-SCF5M24M.js +0 -3
- package/chunks/web-search-67DFNS5V.js +0 -26
- package/chunks/write-file-S5FAX4JJ.js +0 -15
|
@@ -1,388 +0,0 @@
|
|
|
1
|
-
# Approval Mode
|
|
2
|
-
|
|
3
|
-
Matilda Code offers five distinct permission modes that allow you to flexibly control how AI interacts with your code and system based on task complexity and risk level.
|
|
4
|
-
|
|
5
|
-
## Permission Modes Comparison
|
|
6
|
-
|
|
7
|
-
| Mode | File Editing | Shell Commands | Best For | Risk Level |
|
|
8
|
-
| -------------------- | --------------------------- | --------------------------- | ------------------------------------------------------------------------------------------------------ | ---------- |
|
|
9
|
-
| **Plan** | ❌ Read-only analysis only | ❌ Not executed | • Code exploration <br>• Planning complex changes <br>• Safe code review | Lowest |
|
|
10
|
-
| **Ask Permissions** | ✅ Manual approval required | ✅ Manual approval required | • New/unfamiliar codebases <br>• Critical systems <br>• Team collaboration <br>• Learning and teaching | Low |
|
|
11
|
-
| **Auto-Edit** | ✅ Auto-approved | ❌ Manual approval required | • Daily development tasks <br>• Refactoring and code improvements <br>• Safe automation | Medium |
|
|
12
|
-
| **Auto** | ✅ Classifier-evaluated | ✅ Classifier-evaluated | • Long autonomous sessions <br>• When Auto-Edit is too cautious but YOLO is too risky | Medium |
|
|
13
|
-
| **YOLO** | ✅ Auto-approved | ✅ Auto-approved | • Trusted personal projects <br>• Automated scripts/CI/CD <br>• Batch processing tasks | Highest |
|
|
14
|
-
|
|
15
|
-
> [!NOTE]
|
|
16
|
-
>
|
|
17
|
-
> The mode previously named **Default** has been renamed to **Ask Permissions** to better describe its behavior. The underlying configuration value (`tools.approvalMode: "default"`) and the `/approval-mode default` command are unchanged for backward compatibility.
|
|
18
|
-
|
|
19
|
-
### Quick Reference Guide
|
|
20
|
-
|
|
21
|
-
- **Start in Plan Mode**: Great for understanding before making changes
|
|
22
|
-
- **Work in Ask Permissions Mode**: The balanced choice for most development work
|
|
23
|
-
- **Switch to Auto-Edit**: When you're making lots of safe code changes
|
|
24
|
-
- **Try Auto Mode**: When you want fewer interruptions but still want safety on shell commands and network calls — an LLM classifier evaluates each call
|
|
25
|
-
- **Use YOLO sparingly**: Only for trusted automation in controlled environments
|
|
26
|
-
|
|
27
|
-
> [!tip]
|
|
28
|
-
>
|
|
29
|
-
> You can quickly cycle through modes during a session using **Shift+Tab** (or **Tab** on Windows). The terminal status bar shows your current mode, so you always know what permissions Matilda Code has.
|
|
30
|
-
|
|
31
|
-
> The cycle order is: **plan → default → auto-edit → auto → yolo → plan → ...**
|
|
32
|
-
|
|
33
|
-
## 1. Use Plan Mode for safe code analysis
|
|
34
|
-
|
|
35
|
-
Plan Mode instructs Matilda Code to create a plan by analyzing the codebase with **read-only** operations, perfect for exploring codebases, planning complex changes, or reviewing code safely.
|
|
36
|
-
|
|
37
|
-
### When to use Plan Mode
|
|
38
|
-
|
|
39
|
-
- **Multi-step implementation**: When your feature requires making edits to many files
|
|
40
|
-
- **Code exploration**: When you want to research the codebase thoroughly before changing anything
|
|
41
|
-
- **Interactive development**: When you want to iterate on the direction with Matilda Code
|
|
42
|
-
|
|
43
|
-
### How to use Plan Mode
|
|
44
|
-
|
|
45
|
-
**Turn on Plan Mode during a session**
|
|
46
|
-
|
|
47
|
-
You can switch into Plan Mode during a session using **Shift+Tab** (or **Tab** on Windows) to cycle through permission modes.
|
|
48
|
-
|
|
49
|
-
If you are in Normal Mode, **Shift+Tab** (or **Tab** on Windows) first switches into `auto-edits` Mode, indicated by `⏵⏵ accept edits on` at the bottom of the terminal. A subsequent **Shift+Tab** (or **Tab** on Windows) will switch into Plan Mode, indicated by `⏸ plan mode`.
|
|
50
|
-
|
|
51
|
-
**Use the `/plan` command**
|
|
52
|
-
|
|
53
|
-
The `/plan` command provides a quick shortcut for entering and exiting Plan Mode:
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
/plan # Enter plan mode
|
|
57
|
-
/plan refactor the auth module # Enter plan mode and start planning
|
|
58
|
-
/plan exit # Exit plan mode, restore previous mode
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
When you exit Plan Mode with `/plan exit`, your previous approval mode is automatically restored (e.g., if you were in Auto-Edit before entering Plan Mode, you'll return to Auto-Edit).
|
|
62
|
-
|
|
63
|
-
**Start a new session in Plan Mode**
|
|
64
|
-
|
|
65
|
-
To start a new session in Plan Mode, use the `/approval-mode` then select `plan`
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
/approval-mode
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
**Run "headless" queries in Plan Mode**
|
|
72
|
-
|
|
73
|
-
You can also run a query in Plan Mode directly with `-p` or `prompt`:
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
matilda --prompt "What is machine learning?"
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
### Example: Planning a complex refactor
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
/plan I need to refactor our authentication system to use OAuth2. Create a detailed migration plan.
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
Matilda Code enters Plan Mode and analyzes the current implementation to create a comprehensive plan. Refine with follow-ups:
|
|
86
|
-
|
|
87
|
-
```
|
|
88
|
-
What about backward compatibility?
|
|
89
|
-
How should we handle database migration?
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
### Configure Plan Mode as default
|
|
93
|
-
|
|
94
|
-
```json
|
|
95
|
-
// .matilda/settings.json
|
|
96
|
-
{
|
|
97
|
-
"tools": {
|
|
98
|
-
"approvalMode": "plan"
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
## 2. Use Ask Permissions Mode for Controlled Interaction
|
|
104
|
-
|
|
105
|
-
Ask Permissions Mode is the standard way to work with Matilda Code. In this mode, you maintain full control over all potentially risky operations - Matilda Code will ask for your approval before making any file changes or executing shell commands.
|
|
106
|
-
|
|
107
|
-
### When to use Ask Permissions Mode
|
|
108
|
-
|
|
109
|
-
- **New to a codebase**: When you're exploring an unfamiliar project and want to be extra cautious
|
|
110
|
-
- **Critical systems**: When working on production code, infrastructure, or sensitive data
|
|
111
|
-
- **Learning and teaching**: When you want to understand each step Matilda Code is taking
|
|
112
|
-
- **Team collaboration**: When multiple people are working on the same codebase
|
|
113
|
-
- **Complex operations**: When the changes involve multiple files or complex logic
|
|
114
|
-
|
|
115
|
-
### How to use Ask Permissions Mode
|
|
116
|
-
|
|
117
|
-
**Turn on Ask Permissions Mode during a session**
|
|
118
|
-
|
|
119
|
-
You can switch into Ask Permissions Mode during a session using **Shift+Tab** (or **Tab** on Windows) to cycle through permission modes. If you're in any other mode, pressing **Shift+Tab** (or **Tab** on Windows) will eventually cycle back to Ask Permissions Mode, indicated by the absence of any mode indicator at the bottom of the terminal.
|
|
120
|
-
|
|
121
|
-
**Start a new session in Ask Permissions Mode**
|
|
122
|
-
|
|
123
|
-
Ask Permissions Mode is the initial mode when you start Matilda Code. If you've changed modes and want to return to Ask Permissions Mode, use:
|
|
124
|
-
|
|
125
|
-
```
|
|
126
|
-
/approval-mode default
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
**Run "headless" queries in Ask Permissions Mode**
|
|
130
|
-
|
|
131
|
-
When running headless commands, Ask Permissions Mode is the default behavior. You can explicitly specify it with:
|
|
132
|
-
|
|
133
|
-
```
|
|
134
|
-
matilda --prompt "Analyze this code for potential bugs"
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
### Example: Safely implementing a feature
|
|
138
|
-
|
|
139
|
-
```
|
|
140
|
-
/approval-mode default
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
```
|
|
144
|
-
I need to add user profile pictures to our application. The pictures should be stored in an S3 bucket and the URLs saved in the database.
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
Matilda Code will analyze your codebase and propose a plan. It will then ask for approval before:
|
|
148
|
-
|
|
149
|
-
1. Creating new files (controllers, models, migrations)
|
|
150
|
-
2. Modifying existing files (adding new columns, updating APIs)
|
|
151
|
-
3. Running any shell commands (database migrations, dependency installation)
|
|
152
|
-
|
|
153
|
-
You can review each proposed change and approve or reject it individually.
|
|
154
|
-
|
|
155
|
-
### Configure Ask Permissions Mode as default
|
|
156
|
-
|
|
157
|
-
```bash
|
|
158
|
-
// .matilda/settings.json
|
|
159
|
-
{
|
|
160
|
-
"tools": {
|
|
161
|
-
"approvalMode": "default"
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
## 3. Auto Edits Mode
|
|
167
|
-
|
|
168
|
-
Auto-Edit Mode instructs Matilda Code to automatically approve file edits while requiring manual approval for shell commands, ideal for accelerating development workflows while maintaining system safety.
|
|
169
|
-
|
|
170
|
-
Auto-approved edit tools include `edit`, `write_file`, and `notebook_edit`.
|
|
171
|
-
|
|
172
|
-
### When to use Auto-Accept Edits Mode
|
|
173
|
-
|
|
174
|
-
- **Daily development**: Ideal for most coding tasks
|
|
175
|
-
- **Safe automation**: Allows AI to modify code while preventing accidental execution of dangerous commands
|
|
176
|
-
- **Team collaboration**: Use in shared projects to avoid unintended impacts on others
|
|
177
|
-
|
|
178
|
-
### How to switch to this mode
|
|
179
|
-
|
|
180
|
-
```
|
|
181
|
-
# Switch via command
|
|
182
|
-
/approval-mode auto-edit
|
|
183
|
-
|
|
184
|
-
# Or use keyboard shortcut
|
|
185
|
-
Shift+Tab (or Tab on Windows) # Switch from other modes
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
### Workflow Example
|
|
189
|
-
|
|
190
|
-
1. You ask Matilda Code to refactor a function
|
|
191
|
-
2. AI analyzes the code and proposes changes
|
|
192
|
-
3. **Automatically** applies all file changes without confirmation
|
|
193
|
-
4. If tests need to be run, it will **request approval** to execute `npm test`
|
|
194
|
-
|
|
195
|
-
## 4. Auto Mode - Classifier-Driven Approval
|
|
196
|
-
|
|
197
|
-
Auto Mode sits between Auto-Edit and YOLO. An LLM classifier evaluates each
|
|
198
|
-
shell command, network call, and out-of-workspace edit and auto-approves
|
|
199
|
-
the ones it judges safe while blocking risky ones. Most read-only operations
|
|
200
|
-
and in-workspace edits skip the classifier for speed.
|
|
201
|
-
|
|
202
|
-
See [auto-mode.md](./auto-mode.md) for the full reference (hints
|
|
203
|
-
configuration, troubleshooting, FAQ).
|
|
204
|
-
|
|
205
|
-
### When to use Auto Mode
|
|
206
|
-
|
|
207
|
-
- **Long autonomous sessions**: When Ask Permissions Mode interrupts too often but
|
|
208
|
-
YOLO is too risky.
|
|
209
|
-
- **Trusted projects**: Internal codebases where the agent should keep
|
|
210
|
-
moving but you still want a guardrail on destructive shell commands and
|
|
211
|
-
outbound network calls.
|
|
212
|
-
- **Headless / scheduled runs**: Where Auto-Edit isn't enough (the agent
|
|
213
|
-
needs to run shell commands too) but you want safety on `rm -rf /`,
|
|
214
|
-
`curl ... | sh`, credential exfiltration, etc.
|
|
215
|
-
|
|
216
|
-
### How to use Auto Mode
|
|
217
|
-
|
|
218
|
-
**Turn on Auto Mode during a session**
|
|
219
|
-
|
|
220
|
-
Press **Shift+Tab** (or **Tab** on Windows) to cycle into Auto Mode. The
|
|
221
|
-
status bar shows the active mode.
|
|
222
|
-
|
|
223
|
-
**Use the `/approval-mode` command**
|
|
224
|
-
|
|
225
|
-
```
|
|
226
|
-
/approval-mode auto
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
The first time you enter Auto Mode, an information message explains how it
|
|
230
|
-
works. The notice does not appear again.
|
|
231
|
-
|
|
232
|
-
**Start a new session in Auto Mode**
|
|
233
|
-
|
|
234
|
-
```jsonc
|
|
235
|
-
// .matilda/settings.json
|
|
236
|
-
{
|
|
237
|
-
"tools": {
|
|
238
|
-
"approvalMode": "auto",
|
|
239
|
-
},
|
|
240
|
-
}
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
### What Auto Mode auto-approves vs blocks
|
|
244
|
-
|
|
245
|
-
The classifier is biased toward blocking when uncertain. Defaults:
|
|
246
|
-
|
|
247
|
-
- **Auto-approved**: read-only commands (ls, cat, git status, grep, find),
|
|
248
|
-
package install in cwd, build/test commands, file edits inside the
|
|
249
|
-
workspace, local-only operations.
|
|
250
|
-
- **Blocked**: irreversible destruction (rm -rf /, fdisk, mkfs),
|
|
251
|
-
code-from-external execution (curl | sh, eval of remote content),
|
|
252
|
-
credential exfiltration, unauthorized persistence (.bashrc edits,
|
|
253
|
-
crontab), security weakening, force-push to main/master.
|
|
254
|
-
|
|
255
|
-
You can customize the classifier's judgement via natural-language hints in
|
|
256
|
-
settings.json. See [auto-mode.md](./auto-mode.md#configuring-hints).
|
|
257
|
-
|
|
258
|
-
### Safety guardrails
|
|
259
|
-
|
|
260
|
-
- **Hard rules remain in force**: `permissions.deny` rules block actions
|
|
261
|
-
before the classifier ever runs.
|
|
262
|
-
- **Over-broad allow rules are stripped while in Auto Mode**: e.g.
|
|
263
|
-
`permissions.allow: ["Bash"]` (allow every shell command) defeats the
|
|
264
|
-
classifier; entering Auto Mode temporarily disables such rules so the
|
|
265
|
-
classifier can do its job. The rules are restored when you leave Auto
|
|
266
|
-
Mode. Settings on disk are never modified.
|
|
267
|
-
- **Fail-closed**: when the classifier API is unreachable, the action is
|
|
268
|
-
blocked rather than allowed. After two consecutive unavailable calls,
|
|
269
|
-
the next tool call falls back to manual approval.
|
|
270
|
-
- **Loop guard**: after three consecutive policy blocks, the next call
|
|
271
|
-
also falls back to manual approval so the agent isn't stuck cycling on
|
|
272
|
-
a dead-end approach.
|
|
273
|
-
|
|
274
|
-
### Example
|
|
275
|
-
|
|
276
|
-
```
|
|
277
|
-
/approval-mode auto
|
|
278
|
-
Refactor the auth module to use OAuth2. Run the full test suite afterwards.
|
|
279
|
-
```
|
|
280
|
-
|
|
281
|
-
Matilda Code makes the file edits (in-workspace edits skip the classifier),
|
|
282
|
-
runs `npm test` (classifier judges safe), and surfaces a block if it ever
|
|
283
|
-
tries something risky like `rm -rf /Users/me/.aws`. You can review the
|
|
284
|
-
reason inline and decide whether to switch to Ask Permissions Mode for that step.
|
|
285
|
-
|
|
286
|
-
### Configure Auto Mode as default
|
|
287
|
-
|
|
288
|
-
```jsonc
|
|
289
|
-
// .matilda/settings.json
|
|
290
|
-
{
|
|
291
|
-
"tools": {
|
|
292
|
-
"approvalMode": "auto",
|
|
293
|
-
},
|
|
294
|
-
"permissions": {
|
|
295
|
-
"autoMode": {
|
|
296
|
-
"hints": {
|
|
297
|
-
"allow": ["Running pytest, mypy, and ruff on this Python repo"],
|
|
298
|
-
"deny": ["Any network call to intranet.example.com"],
|
|
299
|
-
},
|
|
300
|
-
"environment": ["Open-source monorepo; commits are signed"],
|
|
301
|
-
},
|
|
302
|
-
},
|
|
303
|
-
}
|
|
304
|
-
```
|
|
305
|
-
|
|
306
|
-
## 5. YOLO Mode - Full Automation
|
|
307
|
-
|
|
308
|
-
YOLO Mode grants Matilda Code the highest permissions, automatically approving all tool calls including file editing and shell commands.
|
|
309
|
-
|
|
310
|
-
### When to use YOLO Mode
|
|
311
|
-
|
|
312
|
-
- **Automated scripts**: Running predefined automated tasks
|
|
313
|
-
- **CI/CD pipelines**: Automated execution in controlled environments
|
|
314
|
-
- **Personal projects**: Rapid iteration in fully trusted environments
|
|
315
|
-
- **Batch processing**: Tasks requiring multi-step command chains
|
|
316
|
-
|
|
317
|
-
> [!warning]
|
|
318
|
-
>
|
|
319
|
-
> **Use YOLO Mode with caution**: AI can execute any command with your terminal permissions. Ensure:
|
|
320
|
-
>
|
|
321
|
-
> 1. You trust the current codebase
|
|
322
|
-
> 2. You understand all actions AI will perform
|
|
323
|
-
> 3. Important files are backed up or committed to version control
|
|
324
|
-
|
|
325
|
-
### How to enable YOLO Mode
|
|
326
|
-
|
|
327
|
-
```
|
|
328
|
-
# Temporarily enable (current session only)
|
|
329
|
-
/approval-mode yolo
|
|
330
|
-
|
|
331
|
-
# Set as project default
|
|
332
|
-
/approval-mode yolo --project
|
|
333
|
-
|
|
334
|
-
# Set as user global default
|
|
335
|
-
/approval-mode yolo --user
|
|
336
|
-
```
|
|
337
|
-
|
|
338
|
-
### Configuration Example
|
|
339
|
-
|
|
340
|
-
```bash
|
|
341
|
-
// .matilda/settings.json
|
|
342
|
-
{
|
|
343
|
-
"tools": {
|
|
344
|
-
"approvalMode": "yolo"
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
```
|
|
348
|
-
|
|
349
|
-
### Automated Workflow Example
|
|
350
|
-
|
|
351
|
-
```bash
|
|
352
|
-
# Fully automated refactoring task
|
|
353
|
-
matilda --prompt "Run the test suite, fix all failing tests, then commit changes"
|
|
354
|
-
|
|
355
|
-
# Without human intervention, AI will:
|
|
356
|
-
# 1. Run test commands (auto-approved)
|
|
357
|
-
# 2. Fix failed test cases (auto-edit files)
|
|
358
|
-
# 3. Execute git commit (auto-approved)
|
|
359
|
-
```
|
|
360
|
-
|
|
361
|
-
## Mode Switching & Configuration
|
|
362
|
-
|
|
363
|
-
### Keyboard Shortcut Switching
|
|
364
|
-
|
|
365
|
-
During a Matilda Code session, use **Shift+Tab** (or **Tab** on Windows) to quickly cycle through the five modes:
|
|
366
|
-
|
|
367
|
-
```
|
|
368
|
-
Plan Mode → Ask Permissions Mode → Auto-Edit Mode → Auto Mode → YOLO Mode → Plan Mode
|
|
369
|
-
```
|
|
370
|
-
|
|
371
|
-
### Persistent Configuration
|
|
372
|
-
|
|
373
|
-
```
|
|
374
|
-
// Project-level: ./.matilda/settings.json
|
|
375
|
-
// User-level: ~/.matilda/settings.json
|
|
376
|
-
{
|
|
377
|
-
"tools": {
|
|
378
|
-
"approvalMode": "auto-edit" // or "plan", "default", "auto", "yolo"
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
```
|
|
382
|
-
|
|
383
|
-
### Mode Usage Recommendations
|
|
384
|
-
|
|
385
|
-
1. **New to codebase**: Start with **Plan Mode** for safe exploration
|
|
386
|
-
2. **Daily development tasks**: Use **Auto-Accept Edits** (default mode), efficient and safe
|
|
387
|
-
3. **Automated scripts**: Use **YOLO Mode** in controlled environments for full automation
|
|
388
|
-
4. **Complex refactoring**: Use **Plan Mode** first for detailed planning, then switch to appropriate mode for execution
|
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
# Agent Arena
|
|
2
|
-
|
|
3
|
-
> Dispatch multiple AI models simultaneously to execute the same task, compare their solutions side-by-side, and select the best result to apply to your workspace.
|
|
4
|
-
|
|
5
|
-
> [!warning]
|
|
6
|
-
> Agent Arena is experimental. It has [known limitations](#limitations) around display modes and session management.
|
|
7
|
-
|
|
8
|
-
Agent Arena lets you pit multiple AI models against each other on the same task. Each model runs as a fully independent agent in its own isolated Git worktree, so file operations never interfere. When all agents finish, you compare results and select a winner to merge back into your main workspace.
|
|
9
|
-
|
|
10
|
-
Unlike [subagents](/users/features/sub-agents), which delegate focused subtasks within a single session, Arena agents are complete, top-level agent instances — each with its own model, context window, and full tool access.
|
|
11
|
-
|
|
12
|
-
This page covers:
|
|
13
|
-
|
|
14
|
-
- [When to use Agent Arena](#when-to-use-agent-arena)
|
|
15
|
-
- [Starting an arena session](#start-an-arena-session)
|
|
16
|
-
- [Interacting with agents](#interact-with-agents), including display modes and navigation
|
|
17
|
-
- [Comparing results and selecting a winner](#compare-results-and-select-a-winner)
|
|
18
|
-
- [Best practices](#best-practices)
|
|
19
|
-
|
|
20
|
-
## When to use Agent Arena
|
|
21
|
-
|
|
22
|
-
Agent Arena is most effective when you want to **evaluate or compare** how different models tackle the same problem. The strongest use cases are:
|
|
23
|
-
|
|
24
|
-
- **Model benchmarking**: Evaluate different models' capabilities on real tasks in your actual codebase, not synthetic benchmarks
|
|
25
|
-
- **Best-of-N selection**: Get multiple independent solutions and pick the best implementation
|
|
26
|
-
- **Exploring approaches**: See how different models reason about and solve the same problem — useful for learning and insight
|
|
27
|
-
- **Risk reduction**: For critical changes, validate that multiple models converge on a similar approach before committing
|
|
28
|
-
|
|
29
|
-
Agent Arena uses significantly more tokens than a single session (each agent has its own context window and model calls). It works best when the value of comparison justifies the cost. For routine tasks where you trust your default model, a single session is more efficient.
|
|
30
|
-
|
|
31
|
-
## Start an arena session
|
|
32
|
-
|
|
33
|
-
Use the `/arena` slash command to launch a session. Specify the models you want to compete and the task:
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
/arena --models matilda3.5-plus,glm-5,kimi-k2.5 "Refactor the authentication module to use JWT tokens"
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
If you omit `--models`, an interactive model selection dialog appears, letting you pick from your configured providers.
|
|
40
|
-
|
|
41
|
-
### What happens when you start
|
|
42
|
-
|
|
43
|
-
1. **Worktree setup**: Matilda Code creates isolated Git worktrees for each agent at `~/.matilda/arena/<session-id>/worktrees/<model-name>/`. Each worktree mirrors your current working directory state exactly — including staged changes, unstaged changes, and untracked files.
|
|
44
|
-
2. **Agent spawning**: Each agent starts in its own worktree with full tool access and its configured model. Agents are launched sequentially but execute in parallel.
|
|
45
|
-
3. **Execution**: All agents work on the task independently with no shared state or communication. You can monitor their progress and interact with any of them.
|
|
46
|
-
4. **Completion**: When all agents finish (or fail), you enter the result comparison phase.
|
|
47
|
-
|
|
48
|
-
## Interact with agents
|
|
49
|
-
|
|
50
|
-
### Display modes
|
|
51
|
-
|
|
52
|
-
Agent Arena currently supports **in-process mode**, where all agents run asynchronously within the same terminal process. A tab bar at the bottom of the terminal lets you switch between agents.
|
|
53
|
-
|
|
54
|
-
> [!note]
|
|
55
|
-
> **Split-pane display modes are planned for the future.** We intend to support tmux-based and iTerm2-based split-pane layouts, where each agent gets its own terminal pane for true side-by-side viewing. Currently, only in-process tab switching is available.
|
|
56
|
-
|
|
57
|
-
### Navigate between agents
|
|
58
|
-
|
|
59
|
-
In in-process mode, use keyboard shortcuts to switch between agent views:
|
|
60
|
-
|
|
61
|
-
| Shortcut | Action |
|
|
62
|
-
| :------- | :-------------------------------- |
|
|
63
|
-
| `Right` | Switch to the next agent tab |
|
|
64
|
-
| `Left` | Switch to the previous agent tab |
|
|
65
|
-
| `Up` | Switch focus to the input box |
|
|
66
|
-
| `Down` | Switch focus to the agent tab bar |
|
|
67
|
-
|
|
68
|
-
The tab bar shows each agent's current status:
|
|
69
|
-
|
|
70
|
-
| Indicator | Meaning |
|
|
71
|
-
| :-------- | :--------------------- |
|
|
72
|
-
| `●` | Running or idle |
|
|
73
|
-
| `✓` | Completed successfully |
|
|
74
|
-
| `✗` | Failed |
|
|
75
|
-
| `○` | Cancelled |
|
|
76
|
-
|
|
77
|
-
### Interact with individual agents
|
|
78
|
-
|
|
79
|
-
When viewing an agent's tab, you can:
|
|
80
|
-
|
|
81
|
-
- **Send messages** — type in the input area to give the agent additional instructions
|
|
82
|
-
- **Approve tool calls** — if an agent requests tool approval, the confirmation dialog appears in its tab
|
|
83
|
-
- **View full history** — scroll through the agent's complete conversation, including model output, tool calls, and results
|
|
84
|
-
|
|
85
|
-
Each agent is a full, independent session. Anything you can do with the main agent, you can do with an arena agent.
|
|
86
|
-
|
|
87
|
-
## Compare results and select a winner
|
|
88
|
-
|
|
89
|
-
When all agents complete, the Arena enters the result comparison phase. You'll see:
|
|
90
|
-
|
|
91
|
-
- **Status summary**: Which agents succeeded, failed, or were cancelled
|
|
92
|
-
- **Execution metrics**: Duration, rounds of reasoning, token usage, and tool call counts for each agent
|
|
93
|
-
- **Arena comparison summary**: Files changed in common vs. by one agent only, line-change counts, token efficiency, and a high-level approach summary generated from each agent's diff, metrics, and conversation history
|
|
94
|
-
|
|
95
|
-
A selection dialog presents the successful agents. Choose one to apply its changes to your main workspace, or discard all results. Press `p` to toggle a quick preview for the highlighted agent, or `d` to toggle that agent's detailed diff before selecting a winner.
|
|
96
|
-
|
|
97
|
-
### What happens when you select a winner
|
|
98
|
-
|
|
99
|
-
1. The winning agent's changes are extracted as a diff against the baseline
|
|
100
|
-
2. The diff is applied to your main working directory
|
|
101
|
-
3. All worktrees and temporary branches are cleaned up automatically
|
|
102
|
-
|
|
103
|
-
If you want to inspect the complete reasoning path before deciding, each agent's full conversation history is still available via the tab bar while the selection dialog is active.
|
|
104
|
-
|
|
105
|
-
## Configuration
|
|
106
|
-
|
|
107
|
-
Arena behavior can be customized in [settings.json](/users/configuration/settings):
|
|
108
|
-
|
|
109
|
-
```json
|
|
110
|
-
{
|
|
111
|
-
"arena": {
|
|
112
|
-
"worktreeBaseDir": "~/.matilda/arena",
|
|
113
|
-
"maxRoundsPerAgent": 50,
|
|
114
|
-
"timeoutSeconds": 600
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
| Setting | Description | Default |
|
|
120
|
-
| :------------------------ | :--------------------------------- | :----------------- |
|
|
121
|
-
| `arena.worktreeBaseDir` | Base directory for arena worktrees | `~/.matilda/arena` |
|
|
122
|
-
| `arena.maxRoundsPerAgent` | Maximum reasoning rounds per agent | `50` |
|
|
123
|
-
| `arena.timeoutSeconds` | Timeout for each agent in seconds | `600` |
|
|
124
|
-
|
|
125
|
-
## Best practices
|
|
126
|
-
|
|
127
|
-
### Choose models that complement each other
|
|
128
|
-
|
|
129
|
-
Arena is most valuable when you compare models with meaningfully different strengths. For example:
|
|
130
|
-
|
|
131
|
-
```
|
|
132
|
-
/arena --models matilda3.5-plus,glm-5,kimi-k2.5 "Optimize the database query layer"
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
Comparing three versions of the same model family yields less insight than comparing across providers.
|
|
136
|
-
|
|
137
|
-
### Keep tasks self-contained
|
|
138
|
-
|
|
139
|
-
Arena agents work independently with no communication. Tasks should be fully describable in the prompt without requiring back-and-forth:
|
|
140
|
-
|
|
141
|
-
**Good**: "Refactor the payment module to use the strategy pattern. Update all tests."
|
|
142
|
-
|
|
143
|
-
**Less effective**: "Let's discuss how to improve the payment module" — this benefits from conversation, which is better suited to a single session.
|
|
144
|
-
|
|
145
|
-
### Limit the number of agents
|
|
146
|
-
|
|
147
|
-
Up to 5 agents can run simultaneously. In practice, 2-3 agents provide the best balance of comparison value to resource cost. More agents means:
|
|
148
|
-
|
|
149
|
-
- Higher token costs (each agent has its own context window)
|
|
150
|
-
- Longer total execution time
|
|
151
|
-
- More results to compare
|
|
152
|
-
|
|
153
|
-
Start with 2-3 and scale up only when the comparison value justifies it.
|
|
154
|
-
|
|
155
|
-
### Use Arena for high-impact decisions
|
|
156
|
-
|
|
157
|
-
Arena shines when the stakes justify running multiple models:
|
|
158
|
-
|
|
159
|
-
- Choosing an architecture for a new module
|
|
160
|
-
- Selecting an approach for a complex refactor
|
|
161
|
-
- Validating a critical bug fix from multiple angles
|
|
162
|
-
|
|
163
|
-
For routine changes like renaming a variable or updating a config file, a single session is faster and cheaper.
|
|
164
|
-
|
|
165
|
-
## Troubleshooting
|
|
166
|
-
|
|
167
|
-
### Agents failing to start
|
|
168
|
-
|
|
169
|
-
- Verify that each model in `--models` is properly configured with valid API credentials
|
|
170
|
-
- Check that your working directory is a Git repository (worktrees require Git)
|
|
171
|
-
- Ensure you have write access to the worktree base directory (`~/.matilda/arena/` by default)
|
|
172
|
-
|
|
173
|
-
### Worktree creation fails
|
|
174
|
-
|
|
175
|
-
- Run `git worktree list` to check for stale worktrees from previous sessions
|
|
176
|
-
- Clean up stale worktrees with `git worktree prune`
|
|
177
|
-
- Ensure your Git version supports worktrees (`git --version`, requires Git 2.5+)
|
|
178
|
-
|
|
179
|
-
### Agent takes too long
|
|
180
|
-
|
|
181
|
-
- Increase the timeout: set `arena.timeoutSeconds` in settings
|
|
182
|
-
- Reduce task complexity — Arena tasks should be focused and well-defined
|
|
183
|
-
- Lower `arena.maxRoundsPerAgent` if agents are spending too many rounds
|
|
184
|
-
|
|
185
|
-
### Applying winner fails
|
|
186
|
-
|
|
187
|
-
- Check for uncommitted changes in your main working directory that might conflict
|
|
188
|
-
- The diff is applied as a patch — merge conflicts are possible if your working directory changed during the session
|
|
189
|
-
|
|
190
|
-
## Limitations
|
|
191
|
-
|
|
192
|
-
Agent Arena is experimental. Current limitations:
|
|
193
|
-
|
|
194
|
-
- **In-process mode only**: Split-pane display via tmux or iTerm2 is not yet available. All agents run within a single terminal window with tab switching.
|
|
195
|
-
- **No diff preview before selection**: You can view each agent's conversation history, but there is no unified diff viewer to compare solutions side-by-side before picking a winner.
|
|
196
|
-
- **No worktree retention**: Worktrees are always cleaned up after selection. There is no option to preserve them for further inspection.
|
|
197
|
-
- **No session resumption**: Arena sessions cannot be resumed after exiting. If you close the terminal mid-session, worktrees remain on disk and must be cleaned up manually via `git worktree prune`.
|
|
198
|
-
- **Maximum 5 agents**: The hard limit of 5 concurrent agents cannot be changed.
|
|
199
|
-
- **Git repository required**: Arena requires a Git repository for worktree isolation. It cannot be used in non-Git directories.
|
|
200
|
-
|
|
201
|
-
## Comparison with other multi-agent modes
|
|
202
|
-
|
|
203
|
-
Agent Arena is one of several planned multi-agent modes in Matilda Code. **Agent Team** and **Agent Swarm** are not yet implemented — the table below describes their intended design for reference.
|
|
204
|
-
|
|
205
|
-
| | **Agent Arena** | **Agent Team** (planned) | **Agent Swarm** (planned) |
|
|
206
|
-
| :---------------- | :----------------------------------------------------- | :------------------------------------------------- | :------------------------------------------------------- |
|
|
207
|
-
| **Goal** | Competitive: Find the best solution to the _same_ task | Collaborative: Tackle _different_ aspects together | Batch parallel: Dynamically spawn workers for bulk tasks |
|
|
208
|
-
| **Agents** | Pre-configured models compete independently | Teammates collaborate with assigned roles | Workers spawned on-the-fly, destroyed on completion |
|
|
209
|
-
| **Communication** | No inter-agent communication | Direct peer-to-peer messaging | One-way: results aggregated by parent |
|
|
210
|
-
| **Isolation** | Full: separate Git worktrees | Independent sessions with shared task list | Lightweight ephemeral context per worker |
|
|
211
|
-
| **Output** | One selected solution applied to workspace | Synthesized results from multiple perspectives | Aggregated results from parallel processing |
|
|
212
|
-
| **Best for** | Benchmarking, choosing between model approaches | Research, complex collaboration, cross-layer work | Batch operations, data processing, map-reduce tasks |
|
|
213
|
-
|
|
214
|
-
## Next steps
|
|
215
|
-
|
|
216
|
-
Explore related approaches for parallel and delegated work:
|
|
217
|
-
|
|
218
|
-
- **Lightweight delegation**: [Subagents](/users/features/sub-agents) handle focused subtasks within your session — better when you don't need model comparison
|
|
219
|
-
- **Manual parallel sessions**: Run multiple Matilda Code sessions yourself in separate terminals with [Git worktrees](https://git-scm.com/docs/git-worktree) for full manual control
|