Skip to content

Commit d01323e

Browse files
author
StackMemory Bot (CLI)
committed
fix(conductor): auto-detect Linear team ID when --team not provided
cacheWorkflowStates() was silently skipped when teamId was undefined, causing every state transition to log "Target state not found in cache". Now auto-detects the team via client.getTeam() before caching states.
1 parent c697175 commit d01323e

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/cli/commands/orchestrator.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,23 @@ export class Conductor {
191191
// Initialize Linear client
192192
this.client = await this.createLinearClient();
193193

194+
// Auto-detect team ID if not provided
195+
if (!this.config.teamId && this.client) {
196+
try {
197+
const team = await this.client.getTeam();
198+
this.config.teamId = team.id;
199+
logger.info('Auto-detected Linear team', {
200+
id: team.id,
201+
name: team.name,
202+
key: team.key,
203+
});
204+
} catch (err) {
205+
logger.warn('Failed to auto-detect team', {
206+
error: (err as Error).message,
207+
});
208+
}
209+
}
210+
194211
// Cache workflow states for state transitions
195212
await this.cacheWorkflowStates();
196213

0 commit comments

Comments
 (0)