-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Global workflows invisible to webhook commands and web UI #1138
Copy link
Copy link
Closed
Labels
P1High priority - Address soon, next in queueHigh priority - Address soon, next in queuearea: handlersCommand handlerCommand handlerarea: serverHTTP server (packages/server) - API routes, SSE, adaptersHTTP server (packages/server) - API routes, SSE, adaptersarea: workflowsWorkflow engineWorkflow enginebugSomething is brokenSomething is brokeneffort/lowSingle file or function, one responsibility, isolated changeSingle file or function, one responsibility, isolated change
Metadata
Metadata
Assignees
Labels
P1High priority - Address soon, next in queueHigh priority - Address soon, next in queuearea: handlersCommand handlerCommand handlerarea: serverHTTP server (packages/server) - API routes, SSE, adaptersHTTP server (packages/server) - API routes, SSE, adaptersarea: workflowsWorkflow engineWorkflow enginebugSomething is brokenSomething is brokeneffort/lowSingle file or function, one responsibility, isolated changeSingle file or function, one responsibility, isolated change
Bug
Workflows placed in
~/.archon/.archon/workflows/(global/user scope) are not discovered by:@archon /workflow run my-workflowvia GitHub comments)GET /api/workflowsreturns empty for global workflows)The CLI and orchestrator find them correctly because they pass
globalSearchPath: getArchonHome()todiscoverWorkflowsWithConfig.Root Cause
Two callers of
discoverWorkflowsWithConfigdon't passglobalSearchPath:packages/core/src/handlers/command-handler.ts— lines 566, 612, 807 (list, reload, run)packages/server/src/routes/api.ts— line 1770 (GET /api/workflows)Without
globalSearchPath, step 2 ofdiscoverWorkflows(searching~/.archon/.archon/workflows/) is skipped entirely. Only bundled defaults + repo-local.archon/workflows/are searched.Impact
Users who place custom workflows in the global directory (as documented) cannot trigger them via:
@archon /workflow run ...→ "Workflow not found")Fix
PR #1136 — pass
{ globalSearchPath: getArchonHome() }to all 4 call sites.getArchonHomeis already exported from@archon/pathsand already imported in both files.4 lines changed.