中文 English

44% to 0% in 11 Minutes! I Stress-Tested MiniMax Inside Code's Bunny AI Chief Until Error (2056) Hit — 3 Real Truths the Docs Didn't Tell You (+ 3-OS Guard Scripts)

Published: 2026-12-05 · Views --
AI LLM LLM MiniMax M Plan MiniMax Code AI Agent Architecture Architecture Troubleshooting Troubleshooting Pitfall Guide 深度评测 Automation Automation Windows 11 Ubuntu 26.04 macOS 27

Let’s start with an honest admission: right after my previous deep dive on Bunny (based on MiniMax’s Insider Guide and beta survey), readers pointed out the obvious gap—I hadn’t actually run a real, messy coding project through the desktop client yet.

Reading architecture essays is safe; throwing live, buggy code into an AI assistant with a ticking 5-hour quota meter is how you find out what actually happens under load. So I installed the real macOS Apple Silicon build (MiniMax Inside Code 3.1.23-inside.193), signed into a live Plus subscription holding 44% remaining 5-hour quota, and spent 11 unscripted minutes (11:19 to 11:30) watching Bunny tackle a realistic multi-deliverable engineering brief—right up until Playwright self-debugging probes burned that 44% down to 0% and triggered a live (2056) quota interrupt.

Original Hands-On Cover: MiniMax Inside Code Bunny AI Chief 11-Minute Real Stress Test and 3 Real Revelations

Figure 1: Original hands-on test overview (created with Huashu Design principles), summarizing the 11-minute real timeline, live Balanced model pairing, and the 2056 quota cutoff.


1. Background: Four Real Questions Only a Live Run Can Answer

Launch guides always look effortless on paper: you hand off an Item, the AI Chief splits it cleanly, background workers finish without drama, and verified deliverables appear on your desk.

Working engineers immediately ask much sharper questions:

Real Desktop Screenshot: MiniMax Inside Code 3.1.23-inside.193 Bunny Workspace Welcome View

Figure 2: Real desktop screenshot of MiniMax Inside Code 3.1.23-inside.193 right after launch, pairing the central Bunny chat intake with the collapsible "Bunny Workbench (My Items)" drawer on the right.


2. Test Setup: Two Real Production-Style Bugs + One Interactive Web Report

To keep the test honest without risking production code, I built an isolated sandbox at /tmp/bunny-hands-on-demo containing two files loaded with realistic traps:

  1. docs/spec.md: Defines an off-peak 0.5x pricing window spanning 23:00 to 09:00 UTC+8, regular pricing otherwise, and zero-safe latency summaries with accurate p95.
  2. src/metrics.py: Deliberately ships with two classic bugs—an impossible overnight condition (hour >= 23 and hour < 9, which never evaluates true) and an unguarded sum(latencies) / len(latencies) division that raises ZeroDivisionError on empty input—plus a subtle p95 index bug whenever sample size reaches two or more.

In the New Item modal (Figure 3), I entered a 183-character brief asking for three outputs—(1) fix both bugs plus a full tests/test_metrics.py suite, (2) generate a standalone light/dark-mode report/dashboard.html, and (3) run a final DELIVERABLES.md verification—while intentionally leaving "Link Project" unselected to probe path handling.

Real Desktop Screenshot: New Item Modal showing 183/8000 prompt text and unselected Link Project field

Figure 3: Real screenshot of the New Item modal. It pairs a required title with an 8,000-character Goal box, optional multi-folder "Link Project" selector, and "Reference Materials" dropzone.


3. What Actually Happened in Those 11 Minutes (Four Concrete Observations)

Once I hit submit at 11:19, I touched nothing and simply watched Bunny orchestrate the job in real time.

Observation 1: Instant Dependency Graph Dispatch + Honest Project-Binding Caveat

Rather than marching blindly through tasks 1 → 2 → 3 one by one, Bunny paused only briefly to map dependencies (Figure 4), then immediately launched Task 1 (bug fixes + unit tests) and Task 2 (interactive HTML dashboard) in parallel while holding Task 3 (final deliverables audit) back until both prerequisites landed (Figure 5).

Real Desktop Screenshot: Bunny entering planning phase right after Item creation at 11:19

Figure 4: Real screenshot at 11:19. As soon as the brief lands, the new Item registers under "In Progress" on the right while the Bunny avatar shifts into active orchestration.

Equally telling: in paragraph two of Figure 5, Bunny caught my intentional omission immediately and flagged it explicitly—warning that because /tmp/bunny-hands-on-demo wasn't registered as a sidebar Project, workers booted inside the isolated Item directory and operated across directories via absolute path.

Real Desktop Screenshot: Bunny launching two independent tasks in parallel while withholding Task 3 and flagging missing project binding

Figure 5: Real screenshot showing parallel dispatch of Tasks 1 & 2, deliberate gating of Task 3, and the transparent warning about unlinked folder paths.

Original Timeline Infographic: Complete 11-Minute Hands-On Sequence from 11:19 Intake to 11:30 Quota Cutoff

Figure 6: Original infographic (Huashu Design) compressing the complete 11:19–11:30 live sequence into one traceable timeline.

Observation 2: Real Independent Re-Testing, Negative Verification & Scope Restraint

At 11:22, Task 1 wrapped—and Bunny's sign-off message (Figure 7) proved its review step wasn't theatrical:

Real Desktop Screenshot: 11:22 Task 1 Verification Report detailing 23 re-run tests and 22-fail/1-error baseline check

Figure 7: Real screenshot at 11:22. The Item drawer now tracks 1 ended and 1 running, while chat reports exact before/after diffs, test verification numbers, and optional polish items.

Observation 3: Browser Verification Probes Ate 44% Quota to Zero by 11:30

Task 2 produced a genuinely polished, zero-CDN standalone report/dashboard.html (~40.9 KB). Local Chrome Playwright verification confirmed both Light and Dark themes toggle cleanly with pageerrors: [] (Figures 8 and 9).

Real Browser Render: Bunny-Generated report/dashboard.html in Light Mode

Figure 8: Real Chrome render of Bunny's standalone report/dashboard.html in Light theme showing before/after metrics and off-peak rate charts.

Real Browser Render: Bunny-Generated report/dashboard.html after switching to Dark Mode

Figure 9: Real Chrome render after clicking the theme toggle to Dark Mode—crisp contrast and zero console or layout errors.

Inspecting /tmp/bunny-hands-on-demo/tools/ afterward explained the sudden quota cliff: besides build_dashboard.py and verify_dashboard.py, the background worker generated six diagnostic probe scripts (probe_doc.py, probe_err.js, probe_exc.py, probe_ii.js, probe_pre.py, probe_theme.py) while debugging the light/dark toggle via headless browser checks. That multi-turn Playwright loop + DOM inspection under high reasoning exhausted our remaining 44% 5-hour quota right at 11:30, hitting (2056) just as Bunny began its final visual review of Task 2.

Observation 4: Graceful 2056 Recovery Cards + Spotless "Materials 3" Curation

Instead of freezing silently or pretending Task 2 passed review, Bunny retried twice automatically, marked Task 2 as Execution Interrupted (执行中断) under 1 Needs You (1 待处理), and raised two transparent recovery cards (Figure 13): one announcing the 3:00 PM reset window, and a yellow status card explaining that verification failed after two retries while offering Ignore / View Task / resume controls.

Better still, opening the Item's "Materials (资料 3)" tab (Figure 14) revealed only the three genuine deliverables (HTML report, fixed metrics.py, and test_metrics.py)—not one of the eight temporary scaffolding/probe files under tools/ cluttered the handoff shelf.


4. Root-Cause Deep Dive: What the Live Settings Panel Actually Revealed

Once the dust settled at 11:30, opening Bunny's Settings gear immediately overturned my pre-hands-on guess about which tier runs which model.

1. Real Discovery #1: Balanced Mode Inverts Your Intuition — M4 (medium) Leads, M3.1-Flash (high) Executes

Before running the app live, it's tempting to assume a tiny cheap model runs coordination chat while a giant flagship executes sub-tasks. Figure 10 proves the exact opposite in Balanced (均衡) mode:

Real Settings Screenshot: General panel confirming M4 (medium) for Bunny Assistant and M3.1-Flash (high) for Tasks under Balanced mode

Figure 10: Real Settings screenshot (General tab), confirming Balanced mode assigns M4 (medium) to the Bunny coordinator and M3.1-Flash (high) to background task execution, alongside Reset Bunny workspace backups.

Here is the everyday school-project analogy that makes complete sense even to an elementary-school student: Imagine a team making a science-fair poster. You want the calmest, sharpest class captain (M4 medium) planning the layout, catching missing labels, and checking the finished board before handing it to the teacher—she doesn't need to overthink every word for ten minutes, she just needs broad judgment. Meanwhile, the writers and illustrators actually cranking out dozens of drafts and fixing messy eraser marks need fast hands paired with careful checking on each step—that's M3.1-Flash (high).

2. Remote Channels & Built-In Deliverable Plugins

Exploring the other two Settings tabs uncovered why Bunny behaves more like an orchestrator than a chat sidebar:

Real Settings Screenshot: Remote tab with WeChat QR authorization, Feishu link, and tool-call permission toggle

Figure 11: Real Settings screenshot (Remote tab) exposing WeChat QR binding, Feishu linkage, and explicit toggles for remote tool execution.

Real Settings Screenshot: Plugins tab with Browser Control, Excel, Image Gen, PDF, Video Gen, and Word toggles

Figure 12: Real Settings screenshot (Plugins tab) listing six built-in production plugins—led by Browser Control, which powered Task 2's automated verification—plus Excel, Image Gen, PDF, Video Gen, and Word.

3. Why 44% Burned in 11 Minutes — The Kitchen Gas-Tank Analogy

Think of your rolling 5-hour quota like a kitchen propane tank showing 44% remaining. Launching Tasks 1 and 2 in parallel turns on two commercial burners at once using M3.1-Flash (high), while an M4 (medium) head chef tastes and plans alongside them. When Burner 2 noticed the dark-mode sauce wasn't right, it kept firing six consecutive probe skillets to test and inspect the DOM. Eleven minutes later, the tank hit 0%—and MiniMax's safety valve tripped cleanly with (2056), capping the skillet without spilling dinner on the floor (Figures 13 & 14).

Real Desktop Screenshot: Graceful 2056 Quota Cutoff Notice showing 2 automatic retries and 3:00 PM reset time

Figure 13: Real screenshot at 11:30 showing graceful cutoff diagnostics: automatic 2x retry status, exact reset time (3:00 PM), and non-destructive recovery actions.

Real Desktop Screenshot: Clean Materials (3) list containing only final deliverables and zero internal probe scripts

Figure 14: Real screenshot of the Item's Materials tab—cleanly indexing only the 3 deliverable artifacts while keeping all 8 internal scaffolding/probe files out of sight.


5. Fixes & Anti-Burn Playbook: Three Zero-Dependency OS Guard Scripts

To prevent burning a tight 5-hour quota mid-review on future Items, enforce three pre-flight guardrails (Figure 15): bind a real Git-backed workspace folder (never leave "Link Project" empty), switch to serial execution whenever your 5-hour quota sits below 25%, and inject a strict "max 2 debug probe rounds" clause into any brief touching UI/Playwright verification.

Original Playbook Diagram: Three Practical Guardrails Against 5-Hour Quota Avalanche and Workspace Drift

Figure 15: Original playbook diagram (Huashu Design) distilling the three lessons from our 11-minute stress test into concrete pre-flight checkpoints.

1. Zero-Dependency Scripts (Windows 11 / Ubuntu 26.04 / macOS 27)

Every script below relies strictly on built-in OS shells, strips personal directory prefixes, and never emits full IP addresses, computer names, or credentials.

(1) Windows 11 Guard (bunny_handson_guard_windows11.ps1)

Download: bunny_handson_guard_windows11.ps1

<#
.SYNOPSIS
Bunny Hands-On Quota & Project-Binding Guard — Windows 11
Zero third-party dependencies (built-in PowerShell 5.1/7)
Privacy Guard: Never emits full IP addresses, computer hostnames, or raw keys.

.EXAMPLE
Human Interactive:
  powershell -ExecutionPolicy Bypass -File .\bunny_handson_guard_windows11.ps1
Agent Automated:
  powershell -ExecutionPolicy Bypass -File .\bunny_handson_guard_windows11.ps1 -Auto -Json -Target . -InitBrief
#>
[CmdletBinding()]
param(
  [string]$Target = ".",
  [int]$MinQuotaPct = 25,
  [switch]$InitBrief,
  [switch]$Auto,
  [switch]$Json
)

Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"

if ($Json) { $Auto = $true }
if (-not (Test-Path -Path $Target -PathType Container)) {
  Write-Error "Target directory not found: $Target"
  exit 2
}
$TargetAbs = (Resolve-Path -Path $Target).Path
$TargetDisplay = $TargetAbs.Replace($env:USERPROFILE, "~")

if (-not $Auto) {
  Write-Host "=====================================================================" -ForegroundColor Cyan
  Write-Host " Bunny Hands-On Quota & Workspace Guard — Windows 11 (PowerShell)" -ForegroundColor Blue
  Write-Host "=====================================================================" -ForegroundColor Cyan
  $inBrief = Read-Host "Generate .bunny\quota-safe-brief.md in workspace? [Y/n]"
  if ($inBrief -notmatch "^[Nn]") { $InitBrief = $true }
}

$isTmp = ($TargetAbs -match "\\Temp\\")
$hasGit = Test-Path (Join-Path $TargetAbs ".git")
$hasDocs = (Test-Path (Join-Path $TargetAbs "docs")) -or (Test-Path (Join-Path $TargetAbs "README.md"))
$hasTests = (Test-Path (Join-Path $TargetAbs "tests")) -or (Test-Path (Join-Path $TargetAbs "test"))

$insideVer = "not_installed"
foreach ($p in @(
  (Join-Path $env:LOCALAPPDATA "Programs\MiniMax Inside Code\MiniMax Inside Code.exe"),
  (Join-Path $env:LOCALAPPDATA "Programs\MiniMaxEn Inside Code\MiniMaxEn Inside Code.exe")
)) {
  if (Test-Path $p -PathType Leaf) {
    try { $insideVer = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($p).ProductVersion } catch { $insideVer = "unknown" }
    break
  }
}

$pyOk = [bool](Get-Command python -ErrorAction SilentlyContinue) -or [bool](Get-Command python3 -ErrorAction SilentlyContinue)

$briefWritten = $false
if ($InitBrief) {
  $bDir = Join-Path $TargetAbs ".bunny"
  if (-not (Test-Path $bDir)) { New-Item -ItemType Directory -Path $bDir -Force | Out-Null }
  $briefText = @"
# Bunny 实操防爆额事项简报(Quota-Safe Item Brief)

## 1. 绑定说明(必读)
- 创建事项时,务必在「新建事项 -> 关联项目 -> 添加文件夹」选中本目录,避免任务退回到事项目录后靠绝对路径跨目录操作。

## 2. 目标与拆解边界
- 核心交付物:
- 依赖顺序:互不依赖任务并行,总汇总与交付核对放在最后。

## 3. 防 5 小时额度雪崩约束(实测避坑)
- 调试上限:涉及浏览器/Playwright 自检时最多允许 2 轮定位脚本,禁止无限制造临时探针脚本。
- 额度检查:发起并行子任务前确认左下角 5 小时限额剩余 >= $MinQuotaPct%,否则优先串行单任务推进。
"@
  [System.IO.File]::WriteAllText((Join-Path $bDir "quota-safe-brief.md"), $briefText, (New-Object System.Text.UTF8Encoding($false)))
  $briefWritten = $true
}

if ($Json) {
  [ordered]@{
    platform = "Windows 11"
    target_display = $TargetDisplay
    inside_app_version = $insideVer
    is_tmp_ephemeral_path = $isTmp
    git_initialized = $hasGit
    python_available = $pyOk
    has_docs_or_readme = $hasDocs
    has_tests_dir = $hasTests
    recommended_min_5h_quota_pct = $MinQuotaPct
    quota_safe_brief_created = $briefWritten
  } | ConvertTo-Json -Depth 3
} else {
  Write-Host ""
  Write-Host "=== Bunny Hands-On Workspace Guard (Windows 11 · Sanitized) ===" -ForegroundColor Green
  Write-Host "Target Workspace:        $TargetDisplay"
  Write-Host "MiniMax Inside Build:    $insideVer"
  Write-Host "Git Repo / Docs / Tests: git=$hasGit | docs=$hasDocs | tests=$hasTests"
  Write-Host "Tmp Path Warning:        $isTmp"
  Write-Host "5h Quota Threshold Tip:  Keep >= $MinQuotaPct% before launching parallel Playwright subtasks"
  Write-Host "Quota-Safe Brief:        $briefWritten"
}

Human interactive run (PowerShell):

powershell -ExecutionPolicy Bypass -File .unny_handson_guard_windows11.ps1

(2) Ubuntu 26.04 SSH-Node Guard (bunny_handson_guard_ubuntu2604.sh)

Download: bunny_handson_guard_ubuntu2604.sh

#!/usr/bin/env bash
# ==============================================================================
# Bunny Hands-On Quota & SSH-Project Guard — Ubuntu 26.04
# Zero third-party dependencies (built-in bash, git, python3, systemctl)
# Privacy Guard: Never emits full IP addresses, computer hostnames, or raw keys.
#
# Modes:
#   Human Interactive: bash ./bunny_handson_guard_ubuntu2604.sh
#   Agent Automated:   bash ./bunny_handson_guard_ubuntu2604.sh --auto --json --target . --init-brief
# ==============================================================================
set -euo pipefail

TARGET_DIR="."
AUTO_MODE=0
JSON_MODE=0
INIT_BRIEF=0
MIN_QUOTA_PCT=25

print_usage() {
  cat <<'USAGE'
Usage: bash bunny_handson_guard_ubuntu2604.sh [options]
  --target <dir>       Remote project directory mounted via SSH in desktop app (default: .)
  --init-brief         Create .bunny/quota-safe-brief.md with anti-burn rules
  --min-quota <pct>    Recommended minimum 5h quota % before parallel tasks (default: 25)
  --auto               Non-interactive mode
  --json               Emit sanitized JSON report to stdout
  -h, --help           Show help
USAGE
}

while [[ $# -gt 0 ]]; do
  case "$1" in
    --target) shift; [[ $# -gt 0 ]] || { echo "Error: --target requires a dir" >&2; exit 2; }; TARGET_DIR="$1" ;;
    --min-quota) shift; [[ $# -gt 0 ]] || { echo "Error: --min-quota requires an integer" >&2; exit 2; }; MIN_QUOTA_PCT="$1" ;;
    --init-brief) INIT_BRIEF=1 ;;
    --auto) AUTO_MODE=1 ;;
    --json) JSON_MODE=1; AUTO_MODE=1 ;;
    -h|--help) print_usage; exit 0 ;;
    *) echo "Unknown option: $1" >&2; print_usage >&2; exit 2 ;;
  esac
  shift
done

[[ -d "$TARGET_DIR" ]] || { echo "Error: Target directory not found: $TARGET_DIR" >&2; exit 2; }
TARGET_ABS="$(cd "$TARGET_DIR" && pwd)"
TARGET_DISPLAY="${TARGET_ABS/#${HOME}/~}"

if [[ "$AUTO_MODE" -eq 0 ]]; then
  echo "====================================================================="
  echo " Bunny Hands-On Quota & SSH-Project Guard — Ubuntu 26.04 (Bash)"
  echo "====================================================================="
  read -r -p "Remote project workspace [${TARGET_DISPLAY}] (Enter to keep): " in_dir || true
  if [[ -n "${in_dir:-}" ]]; then
    [[ -d "$in_dir" ]] || { echo "Directory not found: $in_dir" >&2; exit 2; }
    TARGET_ABS="$(cd "$in_dir" && pwd)"
    TARGET_DISPLAY="${TARGET_ABS/#${HOME}/~}"
  fi
  read -r -p "Generate .bunny/quota-safe-brief.md in workspace? [Y/n]: " in_brief || true
  [[ "${in_brief:-Y}" != [Nn]* ]] && INIT_BRIEF=1
fi

IS_TMP_PATH=false
[[ "$TARGET_ABS" == /tmp/* ]] && IS_TMP_PATH=true

HAS_GIT=false
[[ -d "${TARGET_ABS}/.git" ]] && HAS_GIT=true

PY_OK=false
command -v python3 >/dev/null 2>&1 && PY_OK=true

MCODE_OK=false
command -v mcode >/dev/null 2>&1 && MCODE_OK=true

SSH_OK=false
if command -v systemctl >/dev/null 2>&1; then
  if systemctl is-active --quiet ssh 2>/dev/null || systemctl is-active --quiet sshd 2>/dev/null; then
    SSH_OK=true
  fi
fi

HAS_DOCS=false
[[ -d "${TARGET_ABS}/docs" || -f "${TARGET_ABS}/README.md" ]] && HAS_DOCS=true
HAS_TESTS=false
[[ -d "${TARGET_ABS}/tests" || -d "${TARGET_ABS}/test" ]] && HAS_TESTS=true

BRIEF_WRITTEN=false
if [[ "$INIT_BRIEF" -eq 1 ]]; then
  mkdir -p "${TARGET_ABS}/.bunny"
  cat > "${TARGET_ABS}/.bunny/quota-safe-brief.md" <<'EOF'
# Bunny 实操防爆额事项简报(SSH 远程节点版)

## 1. 绑定说明
- 在 Windows / macOS 的 MiniMax Inside Code 桌面端通过 SSH 连接本目录,并在「新建事项 -> 关联项目」中勾选挂载。

## 2. 目标与拆解边界
- 核心交付物:
- 依赖顺序:代码修复与测试并行,总汇总与验收放在最后。

## 3. 防 5 小时额度雪崩约束
- 调试上限:脚本或自动化测试自愈最多 2 轮,失败即暂停汇报原因,避免无休止重试耗尽 5h 额度。
- 额度阈值:发起多任务并行前确认桌面端左下角 5h 限额剩余 >= 25%。
EOF
  BRIEF_WRITTEN=true
fi

if [[ "$JSON_MODE" -eq 1 ]]; then
  cat <<EOF
{
  "platform": "Ubuntu 26.04",
  "target_display": "${TARGET_DISPLAY}",
  "ssh_daemon_active": ${SSH_OK},
  "mcode_cli_present": ${MCODE_OK},
  "is_tmp_ephemeral_path": ${IS_TMP_PATH},
  "git_initialized": ${HAS_GIT},
  "python3_available": ${PY_OK},
  "has_docs_or_readme": ${HAS_DOCS},
  "has_tests_dir": ${HAS_TESTS},
  "recommended_min_5h_quota_pct": ${MIN_QUOTA_PCT},
  "quota_safe_brief_created": ${BRIEF_WRITTEN}
}
EOF
else
  echo ""
  echo "=== Bunny Hands-On Workspace Guard (Ubuntu 26.04 · Sanitized) ==="
  echo "Target Workspace:        ${TARGET_DISPLAY}"
  echo "SSH Daemon / mcode CLI:  sshd=${SSH_OK} | mcode=${MCODE_OK}"
  echo "Git Repo / Docs / Tests: git=${HAS_GIT} | docs=${HAS_DOCS} | tests=${HAS_TESTS}"
  echo "Tmp Path Warning:        ${IS_TMP_PATH}"
  echo "5h Quota Threshold Tip:  Keep >= ${MIN_QUOTA_PCT}% before launching parallel tasks"
  echo "Quota-Safe Brief:        ${BRIEF_WRITTEN}"
fi

Human interactive run (Bash):

chmod +x ./bunny_handson_guard_ubuntu2604.sh && bash ./bunny_handson_guard_ubuntu2604.sh

(3) macOS 27 Guard (bunny_handson_guard_macos27.zsh)

Download: bunny_handson_guard_macos27.zsh

#!/usr/bin/env zsh
# ==============================================================================
# Bunny Hands-On Quota & Project-Binding Guard — macOS 27
# Zero third-party dependencies (macOS built-in zsh, git, python3, defaults)
# Privacy Guard: Never emits full IP addresses, computer hostnames, or raw keys.
#
# Modes:
#   Human Interactive: zsh ./bunny_handson_guard_macos27.zsh
#   Agent Automated:   zsh ./bunny_handson_guard_macos27.zsh --auto --json --target . --init-brief
# ==============================================================================
emulate -L zsh
setopt PIPE_FAIL NO_UNSET

TARGET_DIR="."
AUTO_MODE=0
JSON_MODE=0
INIT_BRIEF=0
MIN_QUOTA_PCT=25

print_usage() {
  cat <<'USAGE'
Usage: zsh bunny_handson_guard_macos27.zsh [options]
  --target <dir>       Project directory to bind in Bunny (default: .)
  --init-brief         Create .bunny/quota-safe-brief.md with anti-burn rules
  --min-quota <pct>    Recommended minimum 5h quota % before parallel tasks (default: 25)
  --auto               Non-interactive mode
  --json               Emit sanitized JSON report to stdout
  -h, --help           Show help
USAGE
}

while (( $# > 0 )); do
  case "$1" in
    --target) shift; [[ $# -gt 0 ]] || { echo "Error: --target requires a dir" >&2; exit 2; }; TARGET_DIR="$1" ;;
    --min-quota) shift; [[ $# -gt 0 ]] || { echo "Error: --min-quota requires an integer" >&2; exit 2; }; MIN_QUOTA_PCT="$1" ;;
    --init-brief) INIT_BRIEF=1 ;;
    --auto) AUTO_MODE=1 ;;
    --json) JSON_MODE=1; AUTO_MODE=1 ;;
    -h|--help) print_usage; exit 0 ;;
    *) echo "Unknown option: $1" >&2; print_usage >&2; exit 2 ;;
  esac
  shift
done

[[ -d "$TARGET_DIR" ]] || { echo "Error: Target directory not found: $TARGET_DIR" >&2; exit 2; }
TARGET_ABS="$(cd "$TARGET_DIR" && pwd)"
TARGET_DISPLAY="${TARGET_ABS/#${HOME}/~}"

if (( AUTO_MODE == 0 )); then
  print -P "%F{cyan}=====================================================================%f"
  print -P "%B%F{blue} Bunny Hands-On Quota & Workspace Guard — macOS 27 (Zsh)%f%b"
  print -P "%F{cyan}=====================================================================%f"
  printf "Project workspace [%s] (Enter to keep): " "$TARGET_DISPLAY"
  read -r in_dir || true
  if [[ -n "${in_dir:-}" ]]; then
    [[ -d "$in_dir" ]] || { echo "Directory not found: $in_dir" >&2; exit 2; }
    TARGET_ABS="$(cd "$in_dir" && pwd)"
    TARGET_DISPLAY="${TARGET_ABS/#${HOME}/~}"
  fi
  printf "Generate .bunny/quota-safe-brief.md in workspace? [Y/n]: "
  read -r in_brief || true
  [[ "${in_brief:-Y}" != [Nn]* ]] && INIT_BRIEF=1
fi

IS_TMP_PATH=false
[[ "$TARGET_ABS" == /tmp/* || "$TARGET_ABS" == /private/tmp/* ]] && IS_TMP_PATH=true

HAS_GIT=false
[[ -d "${TARGET_ABS}/.git" ]] && HAS_GIT=true

INSIDE_APP_VER="not_installed"
for app_path in "/Applications/MiniMax Inside Code.app" "/Applications/MiniMaxEn Inside Code.app"; do
  if [[ -f "${app_path}/Contents/Info.plist" ]]; then
    INSIDE_APP_VER="$(defaults read "${app_path}/Contents/Info.plist" CFBundleShortVersionString 2>/dev/null || echo 'unknown')"
    break
  fi
done

PY_OK=false
command -v python3 >/dev/null 2>&1 && PY_OK=true

# Check if workspace has a specs/docs anchor and existing tests directory
HAS_DOCS=false
[[ -d "${TARGET_ABS}/docs" || -f "${TARGET_ABS}/README.md" ]] && HAS_DOCS=true
HAS_TESTS=false
[[ -d "${TARGET_ABS}/tests" || -d "${TARGET_ABS}/test" ]] && HAS_TESTS=true

BRIEF_WRITTEN=false
if (( INIT_BRIEF == 1 )); then
  mkdir -p "${TARGET_ABS}/.bunny"
  cat > "${TARGET_ABS}/.bunny/quota-safe-brief.md" <<'EOF'
# Bunny 实操防爆额事项简报(Quota-Safe Item Brief)

## 1. 绑定说明(必读)
- 创建事项时,务必在「新建事项 -> 关联项目 -> 添加文件夹」选中本仓库,避免任务落入独立事项目录后靠绝对路径跨区操作。

## 2. 目标与拆解边界
- 核心交付物:
- 依赖顺序:无依赖任务可并行;汇总与总验收任务必须在子任务全部落地后再发出。

## 3. 防 5 小时额度雪崩约束(来自实测踩坑)
- 调试上限:涉及前端/Playwright 可视化自检时,最多允许 2 轮定位脚本探测,禁止无限循环写临时探针脚本。
- 模型策略:日常「均衡」模式已使用 M4 (medium) 统筹 + M3.1-Flash (high) 执行;若当前 5h 额度低于 25%,优先串行单任务推进而非多任务齐发。
- 验收标准:明确列出要重跑的测试命令与需产出的文件路径,避免把临时调试文件误纳入「资料」交付列表。
EOF
  BRIEF_WRITTEN=true
fi

if (( JSON_MODE == 1 )); then
  cat <<EOF
{
  "platform": "macOS 27",
  "target_display": "${TARGET_DISPLAY}",
  "inside_app_version": "${INSIDE_APP_VER}",
  "is_tmp_ephemeral_path": ${IS_TMP_PATH},
  "git_initialized": ${HAS_GIT},
  "python3_available": ${PY_OK},
  "has_docs_or_readme": ${HAS_DOCS},
  "has_tests_dir": ${HAS_TESTS},
  "recommended_min_5h_quota_pct": ${MIN_QUOTA_PCT},
  "quota_safe_brief_created": ${BRIEF_WRITTEN}
}
EOF
else
  print -r -- ""
  print -P "%B=== Bunny Hands-On Workspace Guard (macOS 27 · Sanitized) ===%b"
  print -r -- "Target Workspace:        ${TARGET_DISPLAY}"
  print -r -- "MiniMax Inside Build:    ${INSIDE_APP_VER}"
  print -r -- "Git Repo / Docs / Tests: git=${HAS_GIT} | docs=${HAS_DOCS} | tests=${HAS_TESTS}"
  print -r -- "Tmp Path Warning:        ${IS_TMP_PATH} (register persistent folder in Bunny '关联项目')"
  print -r -- "5h Quota Threshold Tip:  Keep >= ${MIN_QUOTA_PCT}% before launching parallel Playwright subtasks"
  print -r -- "Quota-Safe Brief:        ${BRIEF_WRITTEN}"
fi

Human interactive run (Zsh):

chmod +x ./bunny_handson_guard_macos27.zsh && zsh ./bunny_handson_guard_macos27.zsh

2. Method 1 vs. Method 2: Human Execution & AI Agent Automation

Run the zero-dependency Bunny hands-on quota & binding guard for the current OS (install zero external dependencies, emit no full IPs or usernames):
- Windows 11: powershell -ExecutionPolicy Bypass -File .unny_handson_guard_windows11.ps1 -Auto -Json -Target . -InitBrief
- Ubuntu 26.04: bash ./bunny_handson_guard_ubuntu2604.sh --auto --json --target . --init-brief
- macOS 27: zsh ./bunny_handson_guard_macos27.zsh --auto --json --target . --init-brief

Verify these 4 actions from the JSON output:
1. If is_tmp_ephemeral_path is true, instruct me to move the repo to a persistent directory and bind it via "Link Project -> Add Folder" in Bunny;
2. If git_initialized is false, ask permission before initializing Git for safe diff tracking;
3. Compare recommended_min_5h_quota_pct (25%) with my bottom-left 5h gauge and serialize tasks if remaining quota is below 25%;
4. Read .bunny/quota-safe-brief.md and draft a concise, quota-safe Item brief tailored to this repo's README.

6. Frequently Asked Questions (Q&A)

Q1: Why did "Balanced" mode burn through 44% of a 5-hour quota in 11 minutes?

Because "Balanced" does not mean single-turn lightweight chat: it orchestrates with M4 (medium) while dispatching parallel background sub-tasks running M3.1-Flash (high)—including automated unit-test mutation checks and multi-step Browser Control DOM probes. Reserve parallel coding + frontend verification for moments when your 5-hour gauge is well above 25%.

Q2: Do finished files or in-progress artifacts disappear if Error (2056) interrupts a task?

No. In our 11:30 cutoff test, completed Task 1 outputs (src/metrics.py and tests/test_metrics.py) remained intact and verified on disk, and even interrupted Task 2's generated report/dashboard.html stayed indexed inside the Item's clean Materials tab so work can resume smoothly after quota reset.

Q3: What happens if I forget to bind a Project Folder when creating a new Item?

Bunny detects the omission cleanly and posts a direct heads-up in chat explaining that tasks started inside the isolated Item directory using absolute paths, advising you to register the folder in the sidebar so subsequent tasks execute directly inside the repository.

Q4: Should I keep every plugin enabled inside Settings -> Plugins?

Keep only what your current Item requires. Browser Control is super effective for verifying interactive HTML deliverables, yet toggling it off—or capping debug probes explicitly in your brief—prevents runaway verification loops on backend-only sprints.


References & Empirical Build Notes

Comments

Sign in with GitHub to comment. Chinese and English versions share the same discussion. Discuss on GitHub

Views --