fix: sync ~/.claude/.credentials.json to per-group session dirs
Without this, per-group credentials become stale when the home credentials are refreshed elsewhere, causing 401 auth errors.
This commit is contained in:
@@ -62,6 +62,14 @@ function prepareGroupEnvironment(
|
||||
'.claude',
|
||||
);
|
||||
fs.mkdirSync(groupSessionsDir, { recursive: true });
|
||||
|
||||
// Sync credentials from user's home ~/.claude/ so per-group sessions stay fresh
|
||||
const homeClaudeDir = path.join(os.homedir(), '.claude');
|
||||
const credsSrc = path.join(homeClaudeDir, '.credentials.json');
|
||||
if (fs.existsSync(credsSrc)) {
|
||||
fs.copyFileSync(credsSrc, path.join(groupSessionsDir, '.credentials.json'));
|
||||
}
|
||||
|
||||
const settingsFile = path.join(groupSessionsDir, 'settings.json');
|
||||
if (!fs.existsSync(settingsFile)) {
|
||||
fs.writeFileSync(
|
||||
|
||||
Reference in New Issue
Block a user