Repository navigation
Dev #1159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev #1159
Changes from all commits
9726e6e
4100d29
3f9b5b9
5f00a9a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1898,7 +1898,12 @@ async function buildResumeParams( | |
| ): Promise<SpawnParams> { | ||
| const agentName = agent.role ?? agent.id; | ||
| const provider = (template?.provider ?? agent.provider ?? 'claude') as ProviderName; | ||
| const team = template?.team ?? agent.team ?? 'genie'; | ||
| const team = template?.team ?? agent.team ?? (await nativeTeams.discoverTeamName()); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When Useful? React with 👍 / 👎. |
||
| if (!team) { | ||
| throw new Error( | ||
| `Cannot resume agent "${agent.id}": no team context (template, agent record, env, or session). Pass --team or set GENIE_TEAM, or run inside a registered tmux session.`, | ||
| ); | ||
| } | ||
|
|
||
| // Restore identity file on resume so the agent keeps its AGENTS.md identity | ||
| // instead of falling back to CWD-based discovery (which walks up and may find | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When falling back to team discovery, it is recommended to pass agent.repoPath to discoverTeamName. This ensures that the discovery logic (which scans for Claude session files) uses the agent's actual working directory rather than the current process's CWD, which may differ if the command is invoked from a different location.