instar 0.7.23 → 0.7.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -127,24 +127,23 @@ export class SessionManager extends EventEmitter {
|
|
|
127
127
|
if (this.tmuxSessionExists(tmuxSession)) {
|
|
128
128
|
throw new Error(`tmux session "${tmuxSession}" already exists`);
|
|
129
129
|
}
|
|
130
|
-
// Build Claude CLI arguments
|
|
131
|
-
//
|
|
132
|
-
//
|
|
130
|
+
// Build Claude CLI arguments — no shell intermediary.
|
|
131
|
+
// tmux new-session executes the command directly (no bash -c needed)
|
|
132
|
+
// when given as separate arguments after the session options.
|
|
133
|
+
// Use -e CLAUDECODE= to unset the CLAUDECODE env var in spawned sessions,
|
|
134
|
+
// preventing nested Claude Code detection when instar runs inside Claude Code.
|
|
133
135
|
const claudeArgs = ['--dangerously-skip-permissions'];
|
|
134
136
|
if (options.model) {
|
|
135
137
|
claudeArgs.push('--model', options.model);
|
|
136
138
|
}
|
|
137
139
|
claudeArgs.push('-p', options.prompt);
|
|
138
|
-
const claudeCmd = [this.config.claudePath, ...claudeArgs]
|
|
139
|
-
.map(a => a.replace(/'/g, "'\\''"))
|
|
140
|
-
.map(a => `'${a}'`)
|
|
141
|
-
.join(' ');
|
|
142
140
|
try {
|
|
143
141
|
execFileSync(this.config.tmuxPath, [
|
|
144
142
|
'new-session', '-d',
|
|
145
143
|
'-s', tmuxSession,
|
|
146
144
|
'-c', this.config.projectDir,
|
|
147
|
-
'
|
|
145
|
+
'-e', 'CLAUDECODE=',
|
|
146
|
+
this.config.claudePath, ...claudeArgs,
|
|
148
147
|
], { encoding: 'utf-8' });
|
|
149
148
|
}
|
|
150
149
|
catch (err) {
|