fix(agent): Add refresh token validation before token refresh
Check for refresh token availability before attempting credential refresh. Setup tokens that expire without a refresh token now return a clear error instead of attempting an invalid refresh operation. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -68,6 +68,13 @@ export class ProcessManager {
|
|||||||
baseBranch
|
baseBranch
|
||||||
}, 'creating project worktrees');
|
}, 'creating project worktrees');
|
||||||
|
|
||||||
|
// No linked projects — fall back to standalone worktree so the agent
|
||||||
|
// always has a git-backed working directory.
|
||||||
|
if (projects.length === 0) {
|
||||||
|
log.info({ alias, initiativeId }, 'initiative has no linked projects, falling back to standalone worktree');
|
||||||
|
return this.createStandaloneWorktree(alias);
|
||||||
|
}
|
||||||
|
|
||||||
for (const project of projects) {
|
for (const project of projects) {
|
||||||
const clonePath = await ensureProjectClone(project, this.workspaceRoot);
|
const clonePath = await ensureProjectClone(project, this.workspaceRoot);
|
||||||
const worktreeManager = new SimpleGitWorktreeManager(clonePath, undefined, agentWorkdir);
|
const worktreeManager = new SimpleGitWorktreeManager(clonePath, undefined, agentWorkdir);
|
||||||
|
|||||||
Reference in New Issue
Block a user