diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md
index b40d45b4..e94d6fb7 100644
--- a/.claude/CLAUDE.md
+++ b/.claude/CLAUDE.md
@@ -3,4 +3,8 @@
- **CLI Tools Usage**: @~/.claude/workflows/cli-tools-usage.md
- **Coding Philosophy**: @~/.claude/workflows/coding-philosophy.md
- **Context Requirements**: @~/.claude/workflows/context-tools.md
-- **File Modification**: @~/.claude/workflows/file-modification.md
\ No newline at end of file
+- **File Modification**: @~/.claude/workflows/file-modification.md
+
+## Agent Execution
+
+- **Always use `run_in_background = false`** for Task tool agent calls to ensure synchronous execution and immediate result visibility
\ No newline at end of file
diff --git a/ccw/src/templates/dashboard-js/views/mcp-manager.js b/ccw/src/templates/dashboard-js/views/mcp-manager.js
index fb0a5c70..af4302c4 100644
--- a/ccw/src/templates/dashboard-js/views/mcp-manager.js
+++ b/ccw/src/templates/dashboard-js/views/mcp-manager.js
@@ -42,17 +42,41 @@ function getCcwEnabledToolsCodex() {
// Get current CCW_PROJECT_ROOT from config
function getCcwProjectRoot() {
+ // Try project config first, then global config
const currentPath = projectPath;
const projectData = mcpAllProjects[currentPath] || {};
- const ccwConfig = projectData.mcpServers?.['ccw-tools'];
- return ccwConfig?.env?.CCW_PROJECT_ROOT || '';
+ const projectCcwConfig = projectData.mcpServers?.['ccw-tools'];
+ if (projectCcwConfig?.env?.CCW_PROJECT_ROOT) {
+ return projectCcwConfig.env.CCW_PROJECT_ROOT;
+ }
+ // Fallback to global config
+ const globalCcwConfig = mcpUserServers?.['ccw-tools'];
+ return globalCcwConfig?.env?.CCW_PROJECT_ROOT || '';
}
// Get current CCW_ALLOWED_DIRS from config
function getCcwAllowedDirs() {
+ // Try project config first, then global config
const currentPath = projectPath;
const projectData = mcpAllProjects[currentPath] || {};
- const ccwConfig = projectData.mcpServers?.['ccw-tools'];
+ const projectCcwConfig = projectData.mcpServers?.['ccw-tools'];
+ if (projectCcwConfig?.env?.CCW_ALLOWED_DIRS) {
+ return projectCcwConfig.env.CCW_ALLOWED_DIRS;
+ }
+ // Fallback to global config
+ const globalCcwConfig = mcpUserServers?.['ccw-tools'];
+ return globalCcwConfig?.env?.CCW_ALLOWED_DIRS || '';
+}
+
+// Get current CCW_PROJECT_ROOT from Codex config
+function getCcwProjectRootCodex() {
+ const ccwConfig = codexMcpServers?.['ccw-tools'];
+ return ccwConfig?.env?.CCW_PROJECT_ROOT || '';
+}
+
+// Get current CCW_ALLOWED_DIRS from Codex config
+function getCcwAllowedDirsCodex() {
+ const ccwConfig = codexMcpServers?.['ccw-tools'];
return ccwConfig?.env?.CCW_ALLOWED_DIRS || '';
}
@@ -260,7 +284,7 @@ async function renderMcpManager() {
+ value="${getCcwProjectRootCodex()}">