mirror of
https://github.com/n8n-io/n8n.git
synced 2026-10-17 05:29:44 +02:00
fix: Make CODESPACE_NAME deterministic in the codespace agent worker (no-changelog) (#36231)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
30aff5d740
commit
c567279606
|
|
@ -51,6 +51,10 @@ for (const [k, v] of Object.entries({
|
|||
}
|
||||
}
|
||||
|
||||
// Not fatal, but box pinning needs it: without a box id every turn routes by
|
||||
// owner, so a thread cannot follow the box holding its session.
|
||||
if (!BOX_ID) console.error('CODESPACE_NAME is not set — box pinning disabled; turns route by githubUser only.');
|
||||
|
||||
function runClaude({ message, sessionId, cwd }) {
|
||||
const safeCwd = resolvePath(typeof cwd === 'string' && cwd ? cwd : `${ROOT}/n8n`);
|
||||
if (safeCwd !== ROOT && !safeCwd.startsWith(ROOT + sep))
|
||||
|
|
|
|||
|
|
@ -28,3 +28,6 @@ services:
|
|||
DB_POSTGRESDB_PASSWORD: password
|
||||
# Prompt-cache TTL in seconds. 1 hour keeps the cache warm between turns.
|
||||
ANTHROPIC_PROMPT_CACHE_TTL: "3600"
|
||||
# Compose does not inherit the codespace env. Pass the box name through so
|
||||
# the worker can stamp boxId and dev:up can print the forwarded URL.
|
||||
CODESPACE_NAME: ${CODESPACE_NAME:-}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user