Skip to content
Merged

Dev #1159

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"plugins": [
{
"name": "genie",
"version": "4.260416.3",
"version": "4.260416.5",
"source": "./plugins/genie",
"description": "Human-AI partnership for Claude Code. Share a terminal, orchestrate workers, evolve together. Brainstorm ideas, wish them into plans, make with parallel agents, ship as one team. A coding genie that grows with your project."
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@automagik/genie",
"version": "4.260416.3",
"version": "4.260416.5",
"description": "Collaborative terminal toolkit for human + AI workflows",
"type": "module",
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion plugins/genie/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "genie",
"version": "4.260416.3",
"version": "4.260416.5",
"description": "Human-AI partnership for Claude Code. Share a terminal, orchestrate workers, evolve together. Brainstorm ideas, turn them into wishes, execute with /work, validate with /review, and ship as one team.",
"author": {
"name": "Namastex Labs"
Expand Down
2 changes: 1 addition & 1 deletion plugins/genie/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "genie-plugin",
"version": "4.260416.3",
"version": "4.260416.5",
"private": true,
"description": "Runtime dependencies for genie bundled CLIs",
"type": "module",
Expand Down
7 changes: 6 additions & 1 deletion src/term-commands/agents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
const team = template?.team ?? agent.team ?? (await nativeTeams.discoverTeamName());
const team = template?.team ?? agent.team ?? (await nativeTeams.discoverTeamName(agent.repoPath));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use agent repo path for team discovery on resume

When template?.team and agent.team are missing, this fallback calls discoverTeamName() without a cwd, so it resolves team context from process.cwd() instead of the agent’s stored workspace. In practice, resuming from a different directory can select the wrong team or return null and raise the new hard error, even though agent.repoPath contains the correct project context. Passing agent.repoPath here would avoid these false failures for legacy/migrated agents that rely on discovery.

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
Expand Down
Loading