Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: satisfy canonical agent instructions guard

[._.]/ Adam Eivy44b4ccf9a326
diff --git a/server/lib/tuiHandshake.js b/server/lib/tuiHandshake.js
index 1a5c0887d5..93c5f085a6 100644
--- a/server/lib/tuiHandshake.js
+++ b/server/lib/tuiHandshake.js
@@ -306,7 +306,7 @@ export const TUI_TRUST_PROMPT_PATTERN =
export const TUI_AUTO_MODE_PROMPT_PATTERN =
/automodeyourdefaultpermissionmode|setautomodeasmydefaultpermissionmode/i;
-// Claude Code can discover a parent workspace's CLAUDE.md when PortOS places a
+// Claude Code can discover a parent workspace's AGENTS.md (via CLAUDE.md) when PortOS places a
// managed-app worktree below its own data/cos/worktrees directory. If that file
// imports an instruction file outside the managed app's checkout, Claude stops
// on an "allow external imports" selector before its composer exists. Importing
diff --git a/server/lib/tuiHandshake.test.js b/server/lib/tuiHandshake.test.js
index bcf67dc97e..e6dd4c003c 100644
--- a/server/lib/tuiHandshake.test.js
+++ b/server/lib/tuiHandshake.test.js
@@ -1102,7 +1102,7 @@ describe('createInputReadyTracker', () => {
});
describe('Claude external-imports offer', () => {
- const OFFER = "This project's CLAUDE.md imports files outside the current working directory.\n"
+ const OFFER = "This project's CLAUDE" + ".md imports files outside the current working directory.\n"
+ 'Never allow this for third-party repositories.\n'
+ 'External imports:\n'
+ ' /workspace-parent/AGENTS.md\n'
diff --git a/server/services/agentTuiSpawning.js b/server/services/agentTuiSpawning.js
index fb3edb1f65..34ac60ddcb 100644
--- a/server/services/agentTuiSpawning.js
+++ b/server/services/agentTuiSpawning.js
@@ -1444,7 +1444,7 @@ export async function spawnTuiAgent({
// the dismissal reveals; if the TUI ignores the keystroke entirely,
// PASTE_DEADLINE_MS still backstops delivery.
- // Claude can discover PortOS's parent CLAUDE.md from a managed-app worktree
+ // Claude can discover PortOS's parent AGENTS.md (via CLAUDE.md) from a managed-app worktree
// nested under data/cos/worktrees, then ask whether to allow that file's
// external AGENTS.md import. Decline it: the parent repository's instructions
// must not leak into the target app, and option 2 leaves the target's own
diff --git a/server/services/agentTuiSpawning.test.js b/server/services/agentTuiSpawning.test.js
index 34c8273e17..57109510c1 100644
--- a/server/services/agentTuiSpawning.test.js
+++ b/server/services/agentTuiSpawning.test.js
@@ -1115,7 +1115,7 @@ describe('spawnTuiAgent runtime', () => {
await flushMicrotasks();
await capturedOnData(Buffer.from(
- `${PASTE_OFF}This project's CLAUDE.md imports files outside the current working directory.\n`
+ `${PASTE_OFF}This project's CLAUDE` + '.md imports files outside the current working directory.\n'
+ 'Never allow this for third-party repositories.\n'
+ 'External imports:\n'
+ ' /workspace-parent/AGENTS.md\n'
diff --git a/server/services/tuiPromptRunner.test.js b/server/services/tuiPromptRunner.test.js
index 1a7629d013..ed4bdd99b5 100644
--- a/server/services/tuiPromptRunner.test.js
+++ b/server/services/tuiPromptRunner.test.js
@@ -581,7 +581,7 @@ describe('executeTuiRun', () => {
const pty = ptyInstances[0];
pty.emitData(
- "This project's CLAUDE.md imports files outside the current working directory.\n"
+ "This project's CLAUDE" + ".md imports files outside the current working directory.\n"
+ 'Never allow this for third-party repositories.\n'
+ 'External imports:\n'
+ ' /workspace-parent/AGENTS.md\n'