Opus 4.7大幅提升生產力,透過auto mode等新功能讓Claude更自主執行長任務
AI 語音朗讀 · Edge TTS
Opus 4.7大幅提升生產力,透過auto mode等新功能讓Claude更自主執行長任務。
Boris Cherny近日dogfooding「Opus 4.7」,感覺生產力爆表,他分享多項技巧,強調調整工作流程才能發揮Claude更長時間運行與更強Agentic性的優勢,使用舊流程僅有不錯改善,新流程則帶來顯著飛躍。
Auto mode消除權限提示
Opus 4.7擅長複雜長運行任務,如深度研究、重構程式碼、建構複雜功能、迭代至達成效能基準。過去需全程監督模型,或危險使用--dangerously-skip-permissions。
新推出的auto mode是更安全替代,由模型分類器判斷命令安全性,若安全則自動核准。如此無需監督模型運行,還能平行執行多個Claude,一個Claude運作中即可切換下一個。
Auto mode現適用於Max、Teams及Enterprise使用者的Opus 4.7。在CLI按Shift-tab進入,或在Desktop/VSCode下拉選單選擇。
新技能/fewer-permission-prompts減少提示
新發布的「/fewer-permission-prompts」技能,掃描會話歷史,找出常見但安全的bash及MCP命令,這些命令雖安全卻反复觸發權限提示。
它推薦將這些命令加入權限白名單清單,讓使用者調校權限,避免不必要提示,尤其不使用auto mode時。詳見https://code.claude.com/docs/en/permissions。
Recaps提供會話摘要
本週稍早推出recaps,為Agent執行動作及下一步的簡短摘要。返回長運行會話(數分鐘或數小時後)時極有用。
Focus mode隱藏中間過程
CLI新focus mode隱藏所有中間工作,僅顯示最終結果。模型已達可信水準,Boris信任它執行正確命令及編輯,他僅檢視最終結果。用/focus切換開關。
調整effort level控制思考深度
Opus 4.7採用adaptive thinking而非thinking budgets。透過調effort控制模型思考多寡:低effort加速回應並降低token用量,高effort提升智慧與能力。
Boris多數任務用xhigh effort,最難任務用max effort(max僅限當前會話,其他等級會持續至下會話)。用/effort設定。
驗證機制放大產出2-3倍
確保Claude有驗證工作方式,能將產出放大2-3倍,在4.7更關鍵。依任務而異:
- 後端工作,讓Claude知曉如何啟動伺服器/服務進行End to End (端到端)測試。
- 前端工作,用Claude Chromium extension讓Claude控制瀏覽器。
- 桌面應用,用computer use。
Boris近期提示常為「Claude做blah blah /go」,/go技能讓Claude:
- 用bash、瀏覽器或computer use進行End to End (端到端)自我測試。
- 執行/simplify技能。
- 建立PR。
長運行任務中,驗證確保返回時知曉程式碼運作正常。
權限系統細緻控制
Claude Code權限系統平衡力量與安全,分層設計:
| 工具類型 | 範例 | 需要核准 | 「是,不再詢問」行為 |
|---|---|---|---|
| 唯讀 | 檔案讀取、Grep | 否 | N/A |
| Bash命令 | Shell執行 | 是 | 專案目錄及命令永久 |
| 檔案修改 | 編輯/寫入檔案 | 是 | 會話結束前 |
用/permissions檢視及管理,來自settings.json。規則類型:
- Allow:無需手動核准。
- Ask:每次嘗試使用時提示確認。
- Deny:禁止使用。
規則依序評估:deny > ask > allow,deny優先。
權限模式多樣選擇
設定defaultMode於settings files,各模式適用情境:
- default:首次使用工具時標準提示。
- acceptEdits:自動接受工作目錄或additionalDirectories的檔案編輯及常見檔案系統命令(如mkdir、touch、mv、cp)。
- plan:Plan Mode,僅分析不得修改檔案或執行命令。
- auto:背景安全檢查自動核准工具呼叫,驗證動作符合請求,目前研究預覽。
- dontAsk:除非預先/permissions或permissions.allow,否則自動拒絕。
- bypassPermissions:略過提示,但.git、.claude、.vscode、.idea、.husky寫入仍提示防毀損,僅限容器/VM等隔離環境。管理員可設permissions.disableBypassPermissionsMode為"disable"禁用。
防auto或bypassPermissions,可在settings設permissions.disableAutoMode或disableBypassPermissionsMode為"disable",管理設定無法覆寫。
權限規則語法精準匹配
格式為Tool或Tool(specifier):
- 僅工具名如Bash、WebFetch、Read匹配所有使用。
- Bash(*)等同Bash。
精細指定:
| 規則 | 效果 |
|---|---|
| Bash(npm run build) | 精確匹配npm run build |
| Read(./.env) | 讀取當前目錄.env |
| WebFetch(domain:example.com) | 抓取example.com請求 |
萬用字元與Bash特殊規則
Bash支援* glob模式,任意位置:
{
"permissions": {
"allow": [
"Bash(npm run *)",
"Bash(git commit *)",
"Bash(git * main)",
"Bash(* --version)",
"Bash(* --help *)"
],
"deny": [
"Bash(git push *)"
]
}
}
空格關鍵:Bash(ls )匹配ls -la但非lsof;Bash(ls:)等同尾隨萬用。Claude辨識shell運算子如&&、||,safe-cmd *不允許safe-cmd && other-cmd,各子命令獨立匹配。剝離wrapper如timeout、time,Bash(npm test *)匹配timeout 30 npm test。內建唯讀命令如ls、cat、grep無提示。
其他工具規則
- Read/Edit:deny適用內建檔案工具,非Bash子程序。
- WebFetch(domain:example.com)匹配特定網域。
- MCP:mcp__puppeteer匹配puppeteer伺服器工具。
- Agent:Agent(AgentName)控制子Agent。
Hooks擴展與工作目錄
PreToolUse hooks於工具呼叫前執行,自訂shell命令評估權限,可deny、強制提示或略過。預設存取啟動目錄,擴展用--add-dir、/add-dir或additionalDirectories。
權限與沙盒互補
權限控制工具/檔案/網域存取,沙盒提供OS層檔案系統及網路限制。
管理設定集中控管
組織用managed settings集中配置Claude Code,無法被使用者或專案設定覆寫。
Opus 4.7是重大進步,Boris強調活用這些功能,特別是讓Claude長時間自主運行,搭配驗證及權限調校,將帶來生產力大幅提升。
Dogfooding Opus 4.7 the last few weeks, I've been feeling incredibly productive. Sharing a few tips to get more out of 4.7 🧵
— Boris Cherny (@bcherny) April 16, 2026
1/ Auto mode = no more permission prompts
— Boris Cherny (@bcherny) April 16, 2026
Opus 4.7 loves doing complex, long-running tasks like deep research, refactoring code, building complex features, iterating until it hits a performance benchmark.
In the past, you either had to babysit the model while it did these sorts… pic.twitter.com/rQVi5fjvYy
2/ The new /fewer-permission-prompts skill
— Boris Cherny (@bcherny) April 16, 2026
We've also released a new /fewer-permission-prompts skill. It scans through your session history to find common bash and MCP commands that are safe but caused repeated permission prompts.
It then recommends a list of commands to add to…
3/ Recaps
— Boris Cherny (@bcherny) April 16, 2026
We shipped recaps earlier this week, to prep for Opus 4.7. Recaps are short summaries for what an agent did & what's next.
Very useful when returning to a long-running session after a few minutes or a few hours. pic.twitter.com/zN4zAp91y4
4/ Focus mode
— Boris Cherny (@bcherny) April 16, 2026
I've been loving the new focus mode in the CLI, which hides all the intermediate work to just focus on the final result. The model has reached a point where I generally trust it to run the right commands and make the right edits. I just look at the final result.… pic.twitter.com/aEU6NPtYay
5/ Configure your effort level
— Boris Cherny (@bcherny) April 16, 2026
Opus 4.7 uses adaptive thinking instead of thinking budgets. To tune the model to think more/less, we recommend tuning effort.
Use lower effort for faster responses and lower token usage. Use higher effort for the most intelligence and capability.… pic.twitter.com/h2gY3yQEeK
6/ Give Claude a way to verify its work
— Boris Cherny (@bcherny) April 16, 2026
Finally, make sure Claude has a way to verify its work. This has always been a way to 2-3x what you get out of Claude, and with 4.7 it's more important than ever.
Verification looks different depending on the task. For backend work, make…
Happy coding! Opus 4.7 is a significant step up. To get the most out of it, take the time to adjust your workflow to take advantage of Claude running for longer & being more agentic. It feels like a nice improvement with old workflows, and a significant leap once you take the…
— Boris Cherny (@bcherny) April 16, 2026
