{"type":"assistant.message","timestamp":"2026-08-24T18:57:57.878Z","data":{"content":"Let me rewrite the engine setup to use `fetch` directly:"}}
{"type":"tool.execution_start","timestamp":"2026-08-24T18:57:57.883Z","data":{"toolName":"edit","mcpServerName":""}}
{"type":"tool.execution_complete","timestamp":"2026-08-24T18:57:57.947Z","data":{"toolName":"edit","mcpServerName":"","success":true,"result":{"content":"File /tmp/gh-aw/agent/bench.ts updated with changes.","detailedContent":"\ndiff --git a/tmp/gh-aw/agent/bench.ts b/tmp/gh-aw/agent/bench.ts\nindex 0000000..0000000 100644\n--- a/tmp/gh-aw/agent/bench.ts\n+++ b/tmp/gh-aw/agent/bench.ts\n@@ -2,76 +2,60 @@\n // @ts-ignore\n import { execSync } from \"node:child_process\";\n \n-// Configure multi-provider BYOK engine from GH_AW_COPILOT_SDK_MULTI_PROVIDER_JSON\n-// This is required in the GitHub Agentic Workflows environment.\n+// Configure a fetch-based engine using the api-proxy OpenAI-compatible endpoint.\n+// This is required in the GitHub Agentic Workflows environment where the copilot SDK\n+// connection needs a session token that is not available to agent subprocesses.\n+const _apiBase = \"http://api-proxy:10002\";\n // @ts-ignore\n-const _mpJson = process.env[\"GH_AW_COPILOT_SDK_MULTI_PROVIDER_JSON\"];\n-if (_mpJson) {\n- const _mp = JSON.parse(_mpJson) as {\n- providers: Array<{ name: string; type: string; baseUrl: string; wireApi?: string }>;\n- models: Array<{ id: string; provider: string }>;\n+const _apiKey = process.env[\"COPILOT_API_KEY\"] ?? process.env[\"COPILOT_DUMMY_BYOK\"] ?? \"dummy-byok-key-for-offline-mode\";\n+\n+// Model alias mapping to actual model IDs available at the proxy\n+const _modelMap: Record<string, string> = {\n+ nano: \"claude-sonnet-4.6\",\n+ mini: \"claude-sonnet-4.6\",\n+ small: \"claude-sonnet-4.6\",\n+ medium: \"claude-sonnet-4.6\",\n+ large: \"claude-opus-4.8\",\n+};\n+\n+configureAgent((agentOptions: any) => {\n+ const model = _modelMap[agentOptions.model as string] ?? agentOptions.model ?? \"claude-sonnet-4.6\";\n+ const systemMessage = typeof agentOptions.systemMessage === \"string\" ? agentOptions.systemMessage : undefined;\n+ const messages: Array<{ role: string; content: string }> = [];\n+\n+ return {\n+ async ask(prompt: string, _askOptions: any = {}) {\n+ const requestMessages = [\n+ ...(systemMessage ? [{ role: \"system\", content: systemMessage }] : []),\n+ ...messages,\n+ { role: \"user\", content: prompt },\n+ ];\n+ // @ts-ignore\n+ const resp = await fetch(`${_apiBase}/chat/completions`, {\n+ method: \"POST\",\n+ headers: {\n+ \"Content-Type\": \"application/json\",\n+ \"Authorization\": `******\n+ },\n+ body: JSON.stringify({\n+ model,\n+ messages: requestMessages,\n+ max_tokens: 8192,\n+ }),\n+ });\n+ if (!resp.ok) {\n+ const err = await resp.text();\n+ throw new Error(`API error ${resp.status}: ${err}`);\n+ }\n+ const data = await resp.json() as any;\n+ const text: string = data?.choices?.[0]?.message?.content ?? \"\";\n+ messages.push({ role: \"user\", content: prompt });\n+ messages.push({ role: \"assistant\", content: text });\n+ return text;\n+ },\n+ async close() {},\n };\n- // @ts-ignore\n- const { CopilotClient, RuntimeConnection, approveAll } = await import(\"@github/copilot-sdk\");\n- configureAgent(async (agentOptions: any) => {\n- // @ts-ignore\n- const sdkUri = process.env[\"COPILOT_SDK_URI\"] ?? \"localhost:7777\";\n- const client = new CopilotClient({ connection: RuntimeConnection.forUri(sdkUri) });\n- // Map rig model aliases and plain IDs to provider-qualified IDs\n- const aliasMap: Record<string, string> = {\n- nano: \"copilot/claude-haiku-4.5\",\n- mini: \"copilot/claude-haiku-4.5\",\n- small: \"copilot/claude-haiku-4.5\",\n- medium: \"copilot/claude-sonnet-4.6\",\n- large: \"copilot/claude-opus-4.5\",\n- };\n- const modelMap: Record<string, string> = { ...aliasMap };\n- for (const m of _mp.models) {\n- modelMap[m.id] = `${m.provider}/${m.id}`;\n- modelMap[`${m.provider}/${m.id}`] = `${m.provider}/${m.id}`;\n- }\n- // @ts-ignore\n- const defaultModel = process.env[\"COPILOT_MODEL\"] ?? `${_mp.providers[0]?.name ?? \"copilot\"}/${_mp.models[0]?.id ?? \"claude-sonnet-4.6\"}`;\n- const modelId = modelMap[agentOptions.model] ?? defaultModel;\n- // @ts-ignore\n- process.stderr.write(`[engine-setup] model=${agentOptions.model} → ${modelId}\\n`);\n- let session: any;\n- try {\n- session = await client.createSession({\n- model: modelId,\n- streaming: false,\n- onPermissionRequest: approveAll,\n- providers: _mp.providers as any,\n- models: _mp.models as any,\n- ...(agentOptions.systemMessage !== undefined && { systemMessage: agentOptions.systemMessage }),\n- ...(agentOptions.tools !== undefined && { tools: agentOptions.tools }),\n- });\n- // @ts-ignore\n- process.stderr.write(`[engine-session] created ok sessionId=${session.sessionId}\\n`);\n- } catch (e: any) {\n- // @ts-ignore\n- process.stderr.write(`[engine-session] createSession FAILED: ${e.message}\\n`);\n- throw e;\n- }\n- return {\n- async ask(prompt: string, askOptions: any = {}) {\n- const response = await (session.sendAndWait as any)(\n- askOptions.signal ? { prompt, signal: askOptions.signal } : { prompt },\n- );\n- if (!response) return \"\";\n- if (typeof response === \"string\") return response;\n- const v = response as any;\n- const text = v?.data?.content ?? v?.data?.text ?? v?.text ?? v?.content ?? JSON.stringify(response);\n- // @ts-ignore\n- process.stderr.write(`[engine] model=${modelId} response=${text.slice(0,100)}\\n`);\n- return text;\n- },\n- async close() {\n- if (session.disconnect) await session.disconnect();\n- },\n- };\n- });\n-}\n+});\n \n // Deadline: 25 minutes from module load\n const DEADLINE = Date.now() + 25 * 60_000;\n"}}}
{"type":"assistant.message","timestamp":"2026-08-24T18:58:03.788Z","data":{"content":""}}
{"type":"tool.execution_start","timestamp":"2026-08-24T18:58:03.789Z","data":{"toolName":"bash","mcpServerName":"","command":"cd /home/runner/work/rig/rig/.github/skills/rig && cat /tmp/gh-aw/agent/bench.ts | node rig.ts --typecheck 2>&1 | grep \"program.ts\""}}
{"type":"tool.execution_complete","timestamp":"2026-08-24T18:58:05.564Z","data":{"toolName":"bash","mcpServerName":"","success":true,"result":{"content":"\n<shellId: 134 completed with exit code 1>","detailedContent":"\n<shellId: 134 completed with exit code 1>"}}}
{"type":"assistant.message","timestamp":"2026-08-24T18:58:12.716Z","data":{"content":"Good — no program errors. Let me run:"}}
{"type":"tool.execution_start","timestamp":"2026-08-24T18:58:12.717Z","data":{"toolName":"bash","mcpServerName":"","command":"cd /home/runner/work/rig/rig/.github/skills/rig && cat /tmp/gh-aw/agent/bench.ts | node rig.ts --server > /tmp/gh-aw/agent/bench_output.json 2> /tmp/gh-aw/agent/bench_stderr.txt; echo \"exit: $?\"; head -5 /tmp/gh-aw/agent/bench_stderr.txt"}}
{"type":"tool.execution_complete","timestamp":"2026-08-24T19:00:12.775Z","data":{"toolName":"bash","mcpServerName":"","success":true,"result":{"content":"<command with shellId: 135 is still running after 120 seconds. The command is still running but hasn't produced output yet. You will be automatically notified when it completes; if you need the command to complete end your response with no tool calls to wait for the notification, or use stop_bash to stop it.>","detailedContent":"<command with shellId: 135 is still running after 120 seconds. The command is still running but hasn't produced output yet. You will be automatically notified when it completes; if you need the command to complete end your response with no tool calls to wait for the notification, or use stop_bash to stop it.>"}}}
[copilot-sdk-driver] [sdk-driver] error: Authorization error, you may need to run /login (Request ID: 3b4617ba-66e2-415a-8f01-8240395369fb)
Workflow Failure
Workflow: Daily Rig Decomposition Benchmark
Branch: main
Run: https://github.com/githubnext/rig/actions/runs/32763656738
Warning
Engine Failure: The
copilotengine terminated unexpectedly.Last agent output:
Action Required
Assign this issue to an agent to debug and fix the issue.
Debug with any coding agent
Use this prompt with any coding agent (GitHub Copilot, Claude, Gemini, etc.):
Manually invoke the agent
Debug this workflow failure using your favorite Agent CLI and the
agentic-workflowsprompt.agentic-workflowsskill from.github/skills/agentic-workflows/SKILL.mdor https://github.com/github/gh-aw/blob/main/.github/skills/agentic-workflows/SKILL.mddebug the agentic workflow daily-rig-decomposition-bench failure in https://github.com/githubnext/rig/actions/runs/32763656738Tip
Stop reporting this workflow as a failure
To stop a workflow from creating failure issues, set
report-failure-as-issue: falsein its frontmatter: