fix: honor default target for Claude passthrough (#1539)

Honors the configured default target in the Claude subcommand passthrough resolver.
This commit is contained in:
Kai (Tam Nhu) Tran authored and GitHub committed 2026-06-15 23:12:52 -04:00
1 parent d2848d3931
commit 473aa082f6
2 files changed
+40 -6

No files matched your search

@@ -42,4 +42,25 @@ describe('isBareClaudeSubcommandPassthrough', () => {
);
expect(isBareClaudeSubcommandPassthrough('mcp', ['mcp', '--target', 'codex'])).toBe(false);
});
it('does not reroute through a default profile configured for a non-claude target', () => {
expect(
isBareClaudeSubcommandPassthrough('setup-token', ['setup-token', 'sk-secret'], {
target: 'droid',
})
).toBe(false);
expect(isBareClaudeSubcommandPassthrough('agents', ['agents'], { target: 'codex' })).toBe(
false
);
});
it('allows explicit claude target selection to override a non-claude default profile target', () => {
expect(
isBareClaudeSubcommandPassthrough(
'setup-token',
['setup-token', 'sk-secret', '--target', 'claude'],
{ target: 'droid' }
)
).toBe(true);
});
});