feat: enable /schedule by adding AGENT_TRIGGERS_REMOTE to default features#88
Conversation
…tures Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughTwo files were modified to incorporate the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@build.ts`:
- Around line 11-19: DEFAULT_BUILD_FEATURES currently only includes
"AGENT_TRIGGERS_REMOTE" causing production builds (the features array derived
from envFeatures and DEFAULT_BUILD_FEATURES) to miss BUDDY,
TRANSCRIPT_CLASSIFIER, and BRIDGE_MODE which are enabled by default in dev;
either add "BUDDY", "TRANSCRIPT_CLASSIFIER", and "BRIDGE_MODE" to
DEFAULT_BUILD_FEATURES in build.ts so the features constant matches the dev
configuration (and update any related docs/tests), or explicitly document the
intentional difference and audit code paths that reference these flags (search
for BUDDY, TRANSCRIPT_CLASSIFIER, BRIDGE_MODE usages) to ensure they handle the
disabled state gracefully.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| // Default features that match the official CLI build. | ||
| // Additional features can be enabled via FEATURE_<NAME>=1 env vars. | ||
| const DEFAULT_BUILD_FEATURES = ["AGENT_TRIGGERS_REMOTE"]; | ||
|
|
||
| // Collect FEATURE_* env vars → Bun.build features | ||
| const features = Object.keys(process.env) | ||
| const envFeatures = Object.keys(process.env) | ||
| .filter(k => k.startsWith("FEATURE_")) | ||
| .map(k => k.replace("FEATURE_", "")); | ||
| const features = [...new Set([...DEFAULT_BUILD_FEATURES, ...envFeatures])]; |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Check if other features like BUDDY, TRANSCRIPT_CLASSIFIER, BRIDGE_MODE are used in production code paths
echo "=== Checking feature gates in src/ ==="
rg -n "feature\(['\"]BUDDY" --type=ts
rg -n "feature\(['\"]TRANSCRIPT_CLASSIFIER" --type=ts
rg -n "feature\(['\"]BRIDGE_MODE" --type=ts
echo "=== Checking if these features have production usage ==="
rg -n "feature\(" src/ --type=ts -C2 | head -50Repository: claude-code-best/claude-code
Length of output: 19531
Missing features in production build: align DEFAULT_BUILD_FEATURES between build.ts and scripts/dev.ts.
DEFAULT_BUILD_FEATURES in build.ts only enables AGENT_TRIGGERS_REMOTE, but the codebase contains extensive production usage of BUDDY, TRANSCRIPT_CLASSIFIER, and BRIDGE_MODE—features that are enabled by default in scripts/dev.ts.
The shell search confirms these are not experimental flags:
- TRANSCRIPT_CLASSIFIER: 100+ usages across permission systems, auto-mode, settings, and core permissions logic
- BUDDY: 30+ usages in UI components (CompanionSprite, REPL, PromptInput)
- BRIDGE_MODE: 40+ usages in bridge commands, remote control, and core hooks
If disabling these in the production build is intentional, document why and ensure downstream code handles the disabled state gracefully. Otherwise, add them to DEFAULT_BUILD_FEATURES in build.ts to match the dev configuration.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@build.ts` around lines 11 - 19, DEFAULT_BUILD_FEATURES currently only
includes "AGENT_TRIGGERS_REMOTE" causing production builds (the features array
derived from envFeatures and DEFAULT_BUILD_FEATURES) to miss BUDDY,
TRANSCRIPT_CLASSIFIER, and BRIDGE_MODE which are enabled by default in dev;
either add "BUDDY", "TRANSCRIPT_CLASSIFIER", and "BRIDGE_MODE" to
DEFAULT_BUILD_FEATURES in build.ts so the features constant matches the dev
configuration (and update any related docs/tests), or explicitly document the
intentional difference and audit code paths that reference these flags (search
for BUDDY, TRANSCRIPT_CLASSIFIER, BRIDGE_MODE usages) to ensure they handle the
disabled state gracefully.

Summary
scripts/dev.ts:DEFAULT_FEATURES加入"AGENT_TRIGGERS_REMOTE"build.ts: 新增DEFAULT_BUILD_FEATURES = ["AGENT_TRIGGERS_REMOTE"],与 env 合并Why
/scheduleskill 和RemoteTriggerTool源码已在src/中,但feature('AGENT_TRIGGERS_REMOTE')构建时默认false,Bun DCE 把整条链路裁掉了。只需开启编译开关即可恢复。Test plan
bun run dev→ 输入/schedule能看到交互式工作流bun run build→dist/中包含"scheduled remote agents"字符串/loop和 CronCreate/Delete/List 不受影响🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes