mirror of
https://github.com/stablyai/orca.git
synced 2026-10-24 00:04:01 +00:00
Require an absolute Orca CLI for the agent-teams tmux shim (#14438)
The generated tmux shim fell back to a bare orca / orca.cmd / orca-ide, and cmd.exe resolves an unqualified command against the current directory before PATH (sh does the same via ./empty PATH entries), so a stray orca.cmd in an agent's checkout could run with the agent-teams team id and token in its environment. Resolve only absolute paths, honor the Windows Path env spelling, degrade to in-process teammates when no CLI can be qualified, and make both shims exit 127 instead of guessing. Verified on macOS, Linux (dash + bash), and Windows (cmd.exe + Git Bash). Fixes STA-4215.
This commit is contained in:
@@ -14263,6 +14263,8 @@ describe('OrcaRuntimeService', () => {
|
||||
command: 'claude --resume claude-session',
|
||||
env: {
|
||||
CLAUDE_PROFILE: 'captured',
|
||||
// Why: native panes need an absolute CLI; without one the plan degrades to in-process teammates.
|
||||
ORCA_AGENT_TEAMS_SHIM_BIN: '/opt/orca/bin/orca-ide',
|
||||
ORCA_AGENT_TEAMS_TEAM_ID: 'stale-team',
|
||||
ORCA_AGENT_TEAMS_TOKEN: 'stale-token',
|
||||
TMUX: '/tmp/orca-claude-agent-teams/stale-team,0,1'
|
||||
@@ -14273,6 +14275,7 @@ describe('OrcaRuntimeService', () => {
|
||||
agentArgs: '--teammate-mode auto',
|
||||
agentEnv: {
|
||||
CLAUDE_PROFILE: 'captured',
|
||||
ORCA_AGENT_TEAMS_SHIM_BIN: '/opt/orca/bin/orca-ide',
|
||||
ORCA_AGENT_TEAMS_TEAM_ID: 'stale-team',
|
||||
ORCA_AGENT_TEAMS_TOKEN: 'stale-token',
|
||||
TMUX: '/tmp/orca-claude-agent-teams/stale-team,0,1'
|
||||
@@ -14287,6 +14290,7 @@ describe('OrcaRuntimeService', () => {
|
||||
expect(spawnCall?.env).toMatchObject({
|
||||
CLAUDE_PROFILE: 'captured',
|
||||
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS: '1',
|
||||
ORCA_AGENT_TEAMS_SHIM_BIN: '/opt/orca/bin/orca-ide',
|
||||
TMUX_PANE: '%1'
|
||||
})
|
||||
expect(spawnCall?.env?.ORCA_AGENT_TEAMS_TEAM_ID).toMatch(/^team-/)
|
||||
|
||||
Reference in New Issue
Block a user