Fix: Pass GitHub token to MCP servers in agent mode

The token was being obtained successfully but not outputted from the prepare step for use in later steps. Added explicit output of the GitHub token and debug logging.
This commit is contained in:
km-anthropic
2025-08-11 16:17:01 -07:00
parent 8102aebe6d
commit 0c533aaff5
2 changed files with 3 additions and 0 deletions

View File

@@ -56,6 +56,7 @@ async function run() {
mode, mode,
githubToken, githubToken,
}); });
core.setOutput("GITHUB_TOKEN", githubToken);
// MCP config is handled by individual modes (tag/agent) and included in their claude_args output // MCP config is handled by individual modes (tag/agent) and included in their claude_args output

View File

@@ -41,6 +41,8 @@ export const agentMode: Mode = {
async prepare({ context, githubToken }: ModeOptions): Promise<ModeResult> { async prepare({ context, githubToken }: ModeOptions): Promise<ModeResult> {
// Agent mode handles automation events and any event with explicit prompts // Agent mode handles automation events and any event with explicit prompts
console.log(`Agent mode: githubToken provided: ${!!githubToken}, length: ${githubToken?.length || 0}`);
// TODO: handle by createPrompt (similar to tag and review modes) // TODO: handle by createPrompt (similar to tag and review modes)
// Create prompt directory // Create prompt directory