Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.
JavaScript agentic-codingai-agentsai-governanceautonomous-agentsclaude-codeclicode-reviewcodexcoding-agentsdeveloper-toolsgit-hooksllmlocal-firstmulti-agentsoftware-factoryspec-driven-developmentverificationvibe-coding
fix(init): the board step tells profile and legacy settings apart [I1]
Corey Olson1059b4621d93
diff --git a/src/board-access.js b/src/board-access.jsindex 156ad2c0..e0381edc 100644--- a/src/board-access.js+++ b/src/board-access.js@@ -22,8 +22,9 @@ export function boardNotWritable(file, error, environment = process.env) {const folder = dirname(file);// Codex's workspace-write sandbox keeps .git read-only; its own flag grants the one folder (#913).if (CODEX_MARKERS.some((name) => Boolean(environment[name]))) {+ // A named permission profile ignores the legacy writable_roots key, so each settings form gets its own step.return new Refused('BOARD_NOT_WRITABLE', `Cannot write the board in "${folder}": Codex's workspace-write sandbox keeps .git read-only.`,- `restart Codex with that folder writable: codex --add-dir '${folder.replaceAll("'", "'\\''")}' (or add it to writable_roots under [sandbox_workspace_write] in ~/.codex/config.toml), then run the command again`);+ `restart Codex with that folder writable: codex --add-dir '${folder.replaceAll("'", "'\\''")}'; to keep it in ~/.codex/config.toml, a permission profile takes ${JSON.stringify(folder)} = "write" in its [permissions.<active-profile>.filesystem] table, and only settings without a profile use writable_roots under [sandbox_workspace_write]; then run the command again`);}return new Refused('BOARD_NOT_WRITABLE',`Cannot write the board in "${folder}". Give the agent write access to that folder, the repo's .git/pullboard, or run the command outside the sandbox.`);diff --git a/src/init.js b/src/init.jsindex 12f30c31..90dd4358 100644--- a/src/init.js+++ b/src/init.js@@ -545,8 +545,8 @@ function writeCodexLoopRules(root, gate, onWrite) {}// The board folder sits under .git, which Codex keeps read-only, so it is granted beside the machine home (#913).const workspaceWrite = `sandbox_mode = "workspace-write"\n\n[sandbox_workspace_write]\nwritable_roots = ${JSON.stringify([machinePath, gitPath(root, 'pullboard')])}`;- const profileWrite = `${JSON.stringify(machinePath)} = "write"`;- return `${rulesNote}; trust this project and restart the session to load rules. For machine-home access, merge these exact values into legacy Codex settings: put sandbox_mode at the TOML top level before any table, append these exact paths to any existing writable_roots array while keeping its entries, and do not duplicate the table or replace unrelated settings:\n${workspaceWrite}\nPermission-profile users add ${profileWrite} under their existing [permissions.<active-profile>.filesystem] table instead; do not mix the two configuration formats. Official docs: https://learn.chatgpt.com/docs/config-file/config-reference and https://learn.chatgpt.com/docs/permissions`;+ const profileWrite = `${JSON.stringify(machinePath)} = "write" and ${JSON.stringify(gitPath(root, 'pullboard'))} = "write"`;+ return `${rulesNote}; trust this project and restart the session to load rules. For machine-home access, merge these exact values into legacy Codex settings: put sandbox_mode at the TOML top level before any table, append these exact paths to any existing writable_roots array while keeping its entries, and do not duplicate the table or replace unrelated settings:\n${workspaceWrite}\nPermission-profile users add ${profileWrite} under their existing [permissions.<active-profile>.filesystem] table instead, since a named profile ignores writable_roots; do not mix the two configuration formats. Official docs: https://learn.chatgpt.com/docs/config-file/config-reference and https://learn.chatgpt.com/docs/permissions`;}/**diff --git a/src/templates.js b/src/templates.jsindex 62844b9f..1ea13272 100644--- a/src/templates.js+++ b/src/templates.js@@ -128,7 +128,7 @@ ${doctrineText(doctrine)}It prints the folder to work in and what to run there first. Every join needs the exact model label, either with \`--model\` or the \`PULLBOARD_MODEL\` environment variable; family is separate and never supplies the model. A smaller model joins with \`--route light\` or \`--route mid\` and takes items at its tier and below. Work only in that folder. Your shell may start every command in the main checkout, where pullboard takes you for the coordinator, so begin each command with \`cd <your worktree> &&\`. Verifiers take the \`review\` lane, which owns no folders. Only the coordinator adds a lane, from the main checkout, once the person agrees: \`pullboard lane add <name> --owns <path>[,<path>]\`. \`pullboard init\` proposes lanes from the folder layout and writes none until the person accepts. Keep your worktree and branch until your items are merged.-**Codex.** Codex's workspace-write sandbox keeps \`.git\` read-only, and the board lives in \`.git/pullboard\`, so start Codex with that folder writable before the first pullboard command: \`codex --add-dir "$(git rev-parse --path-format=absolute --git-common-dir)/pullboard"\` (or add the folder to \`writable_roots\` under \`[sandbox_workspace_write]\` in \`~/.codex/config.toml\`). A refused \`BOARD_NOT_WRITABLE\` names the same step.+**Codex.** Codex's workspace-write sandbox keeps \`.git\` read-only, and the board lives in \`.git/pullboard\`, so start Codex with that folder writable before the first pullboard command: \`codex --add-dir "$(git rev-parse --path-format=absolute --git-common-dir)/pullboard"\` To keep it in \`~/.codex/config.toml\`: a permission profile takes \`"<that folder>" = "write"\` in its \`[permissions.<profile>.filesystem]\` table; only settings without a profile use \`writable_roots\` under \`[sandbox_workspace_write]\`, which a named profile ignores. A refused \`BOARD_NOT_WRITABLE\` names the same step.**The loop.**1. \`pullboard resume\` at the start of every session and after your context is compacted: your claim, what came back, unread shouts and the next step. Then \`pullboard inbox\`.diff --git a/test/init-permissions.test.js b/test/init-permissions.test.jsindex a1db6f00..52dfc788 100644--- a/test/init-permissions.test.js+++ b/test/init-permissions.test.js@@ -162,6 +162,8 @@ test('init grants the agent the permissions the Pullboard loop needs [I1,I2]', tassert.ok(initialized.document.notes.some(note => /https:\/\/learn\.chatgpt\.com\/docs\/config-file\/config-reference.*https:\/\/learn\.chatgpt\.com\/docs\/permissions/u.test(note)), 'Codex setup cites the official sandbox and permission-profile references');assert.equal(readFileSync(codexConfigPath, 'utf8'), existingCodexConfig, 'init prints Codex configuration guidance without rewriting a project config');assert.ok(initialized.document.notes.some(note => /permission-profile users.*existing \[permissions\.<active-profile>\.filesystem\].*do not mix/iu.test(note)), 'Codex setup explains the permission-profile alternative without mixing config systems');+ const profileBoard = `${JSON.stringify(machineHomePath)} = "write" and ${JSON.stringify(join(box.root, '.git', 'pullboard'))} = "write" under their existing [permissions.<active-profile>.filesystem] table instead, since a named profile ignores writable_roots`;+ assert.ok(initialized.document.notes.some(note => note.includes(profileBoard)), 'the permission-profile step grants the board folder too (#913)');const settingsBytes = readFileSync(settingsPath, 'utf8');const codexBytes = readFileSync(codexPath, 'utf8');diff --git a/test/machine-home.test.js b/test/machine-home.test.jsindex 6ffea5b8..eb987e04 100644--- a/test/machine-home.test.js+++ b/test/machine-home.test.js@@ -129,6 +129,8 @@ test('a Codex agent that cannot write the board is told the Codex step that granassert.equal(p.run(p.repo, 'resume').code, 0, 'the board opens before it is locked');// init's agent guidance names the step before the first refusal.assert.match(readFileSync(join(p.repo, 'AGENTS.md'), 'utf8'), /\*\*Codex\.\*\* .*codex --add-dir "\$\(git rev-parse --path-format=absolute --git-common-dir\)\/pullboard"/u);+ // A named permission profile ignores writable_roots, so the guidance gives each settings form its own step (#913).+ assert.match(readFileSync(join(p.repo, 'AGENTS.md'), 'utf8'), /a permission profile takes `"<that folder>" = "write"` in its `\[permissions\.<profile>\.filesystem\]` table; only settings without a profile use `writable_roots`/u);lockBoard(folder);try {const codex = runFixtureChild(process.execPath, [join(import.meta.dirname, '..', 'bin', 'pullboard.js'), 'resume', '--json'],@@ -137,6 +139,6 @@ test('a Codex agent that cannot write the board is told the Codex step that granconst { error } = JSON.parse(codex.stdout);assert.equal(error.code, 'BOARD_NOT_WRITABLE');assert.match(error.message, /Codex's workspace-write sandbox keeps \.git read-only/u);- assert.equal(error.next, `restart Codex with that folder writable: codex --add-dir '${folder}' (or add it to writable_roots under [sandbox_workspace_write] in ~/.codex/config.toml), then run the command again`);+ assert.equal(error.next, `restart Codex with that folder writable: codex --add-dir '${folder}'; to keep it in ~/.codex/config.toml, a permission profile takes ${JSON.stringify(folder)} = "write" in its [permissions.<active-profile>.filesystem] table, and only settings without a profile use writable_roots under [sandbox_workspace_write]; then run the command again`);} finally { unlockBoard(folder); }});