From 0836ad1766afebf350a2840d5c5866b7691c5b44 Mon Sep 17 00:00:00 2001 From: Dan Childers Date: Fri, 24 Jul 2026 13:08:57 -0400 Subject: [PATCH] fix: pass GITHUB_TOKEN to sandbox containers Containers need the GitHub token for git push operations after implementing changes. Without it, pushes to fork repos fail with 403. Co-Authored-By: Claude Opus 4.6 --- src/forge/sandbox/runner.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/forge/sandbox/runner.py b/src/forge/sandbox/runner.py index a422ef91..b6bfbef1 100644 --- a/src/forge/sandbox/runner.py +++ b/src/forge/sandbox/runner.py @@ -141,6 +141,9 @@ def _build_env_vars( if container_skill_paths: env["AGENT_SKILL_PATHS"] = container_skill_paths + # Pass GitHub token for git push and API access + env["GITHUB_TOKEN"] = self.settings.github_token.get_secret_value() + # Pass git configuration for commits env["GIT_USER_NAME"] = self.settings.git_user_name env["GIT_USER_EMAIL"] = self.settings.git_user_email