Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions apps/worker/src/run-task/__tests__/run-task.test.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions apps/worker/src/run-task/run-task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,7 @@ export const runTask = async ({
// Fetch integration MCP availability. This is best-effort: failures are
// logged but never block task execution.
const integrations: IntegrationMcpOptions = {};
let mcpConfigurationLoadFailed = false;

try {
const { servers } = await sdk.mcpConnections.getMcpServerConfigs();
Expand All @@ -948,6 +949,7 @@ export const runTask = async ({
logger.warn(
`[runTask] Failed to fetch user MCP server configs: ${error instanceof Error ? error.message : String(error)}`,
);
mcpConfigurationLoadFailed = true;
}

// Deployment-scoped custom stdio MCP servers. Same best-effort posture:
Expand All @@ -969,6 +971,7 @@ export const runTask = async ({
logger.warn(
`[runTask] Failed to fetch custom stdio MCP server configs: ${error instanceof Error ? error.message : String(error)}`,
);
mcpConfigurationLoadFailed = true;
}

const slackReplyContext = getSlackReplyContext(taskRun);
Expand Down Expand Up @@ -1050,6 +1053,9 @@ export const runTask = async ({
),
harnessInstructions,
environmentInstructions,
mcpConfigurationLoadFailed
? `# Integration availability\n\nRoomote could not load the configured MCP integrations for this task. Do not conclude that a missing integration or tool is unconfigured. Tell the user that integration availability could not be verified for this task, and suggest retrying or asking a deployment admin to check Settings > Integrations.`
: undefined,
]
.filter((value): value is string => Boolean(value))
.join('\n\n') || undefined;
Expand Down
Loading