kaizen-agent 1.38.0 → 1.38.1
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.
- package/cli/state.ts +5 -0
- package/package.json +1 -1
package/cli/state.ts
CHANGED
|
@@ -1394,6 +1394,8 @@ export function trustFolder(dir: string, cfg = join(process.env.CLAUDE_CONFIG_DI
|
|
|
1394
1394
|
// pick: the tool, model and yolo chosen for a new run; a decision takes the run's own
|
|
1395
1395
|
// tool and model, and never yolo. card: run it inside the board (agent.launch: card),
|
|
1396
1396
|
// where a pseudo-terminal exists; onChange is told when that agent ends.
|
|
1397
|
+
const CHILD_ENV = /^(CLAUDECODE|CLAUDE_PID|CLAUDE_CODE_(SESSION_ID|CHILD_SESSION|SESSION_ATTENDED|MESSAGING_SOCKET|MESSAGING_TOKEN))$/;
|
|
1398
|
+
|
|
1397
1399
|
export function launchRun(it: Item, from: string, run?: string, pick: { agent?: string; model?: string; yolo?: boolean; card?: boolean; onChange?: () => void } = {}): Launch {
|
|
1398
1400
|
const projectDir = projectOf(from);
|
|
1399
1401
|
// The run will be born here; the board must know the dir or the idea never retires.
|
|
@@ -1401,6 +1403,9 @@ export function launchRun(it: Item, from: string, run?: string, pick: { agent?:
|
|
|
1401
1403
|
const own = run && !pick.agent ? runAgent(join(projectDir, ".kaizen"), run) : null;
|
|
1402
1404
|
const agent = detectDefaultAgent(projectDir, pick.agent ?? own?.cmd);
|
|
1403
1405
|
if (agent.cmd === "claude") trustFolder(projectDir);
|
|
1406
|
+
// A board started inside a Claude Code session carries that session's identity. An
|
|
1407
|
+
// agent inheriting it runs as its child and keeps no transcript, so nothing to resume.
|
|
1408
|
+
for (const k of Object.keys(process.env)) if (CHILD_ENV.test(k)) delete process.env[k];
|
|
1404
1409
|
// onPath, not Bun.which: the board may have taken a login shell's PATH after it started.
|
|
1405
1410
|
const agentBin = onPath(agent.cmd) ?? agent.cmd;
|
|
1406
1411
|
// No text: a run's conversation reopened as it was, with nothing sent to it.
|
package/package.json
CHANGED