osborn 0.9.241 → 0.9.242
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/dist/index.js +21 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2300,6 +2300,16 @@ async function main() {
|
|
|
2300
2300
|
bgEnv[k] = v;
|
|
2301
2301
|
}
|
|
2302
2302
|
bgEnv['CLAUDE_CODE_DISABLE_AUTO_MEMORY'] = '1';
|
|
2303
|
+
// Claude Code refuses bypassPermissions / --dangerously-skip-permissions when the
|
|
2304
|
+
// process runs as root — and every Fly machine runs Osborn as root, so without this
|
|
2305
|
+
// EVERY headless background spawn dies on launch. IS_SANDBOX=1 is Claude Code's
|
|
2306
|
+
// sanctioned "this is an isolated container, root is acceptable" signal — accurate
|
|
2307
|
+
// for a per-user Fly VM. Set on the CHILD's env copy ONLY (bgEnv); the main voice
|
|
2308
|
+
// agent's process.env is never touched. Panel-spawned instances are user-initiated
|
|
2309
|
+
// and intentionally run on the machine's Claude subscription (Tier 1), same as the
|
|
2310
|
+
// foreground session — the "never use the subscription" rule is reserved for the
|
|
2311
|
+
// future autonomous cron/event background primitive, not these.
|
|
2312
|
+
bgEnv['IS_SANDBOX'] = '1';
|
|
2303
2313
|
const bgSdkOptions = {
|
|
2304
2314
|
cwd: slotWorkingDir,
|
|
2305
2315
|
resume: sessionId,
|
|
@@ -5852,6 +5862,17 @@ async function main() {
|
|
|
5852
5862
|
error: `Session ${resolvedSessionId.substring(0, 8)} is already running as a background slot`,
|
|
5853
5863
|
});
|
|
5854
5864
|
}
|
|
5865
|
+
else if (resolvedSessionId === (currentLLM?.sessionId || currentResumeSessionId)) {
|
|
5866
|
+
// Never background the session that's LIVE in the foreground. Pre-IS_SANDBOX this
|
|
5867
|
+
// failed harmlessly on the root check; post-fix it would SUCCEED, putting two
|
|
5868
|
+
// Claude processes appending to the same session JSONL concurrently → transcript
|
|
5869
|
+
// corruption. Refuse it explicitly.
|
|
5870
|
+
await sendToFrontend({
|
|
5871
|
+
type: 'background_session_error',
|
|
5872
|
+
slotId: resolvedSessionId,
|
|
5873
|
+
error: `Session ${resolvedSessionId.substring(0, 8)} is the active foreground session — pick a different session to background`,
|
|
5874
|
+
});
|
|
5875
|
+
}
|
|
5855
5876
|
else {
|
|
5856
5877
|
spawnBackgroundSession(resolvedSessionId, bgDir).catch((err) => {
|
|
5857
5878
|
console.error('❌ spawnBackgroundSession failed:', err instanceof Error ? err.message : err);
|