Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions plugins/codex/scripts/codex-companion.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ async function executeTaskRun(request) {
defaultPrompt: resumeThreadId ? DEFAULT_CONTINUE_PROMPT : "",
model: request.model,
effort: request.effort,
sandbox: request.write ? "workspace-write" : "read-only",
sandbox: request.fullAccess ? "danger-full-access" : (request.write ? "workspace-write" : "read-only"),
onProgress: request.onProgress,
persistThread: true,
threadName: resumeThreadId ? null : buildPersistentTaskThreadName(request.prompt || DEFAULT_CONTINUE_PROMPT)
Expand Down Expand Up @@ -704,7 +704,7 @@ async function handleReview(argv) {
async function handleTask(argv) {
const { options, positionals } = parseCommandInput(argv, {
valueOptions: ["model", "effort", "cwd", "prompt-file"],
booleanOptions: ["json", "write", "resume-last", "resume", "fresh", "background"],
booleanOptions: ["json", "write", "full-access", "resume-last", "resume", "fresh", "background"],
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Wire --full-access through task execution

handleTask now advertises --full-access, but the parsed value is never read or passed into the task request, so executeTaskRun always sees request.fullAccess as falsy and falls back to workspace-write/read-only. In practice, running task --full-access ... is a no-op for both foreground and background runs, which breaks the new CLI contract and can cause tasks requiring full sandbox access to fail unexpectedly.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Wire --full-access through task execution

handleTask now advertises --full-access, but the parsed value is never read or passed into the task request, so executeTaskRun always sees request.fullAccess as falsy and falls back to workspace-write/read-only. In practice, running task --full-access ... is a no-op for both foreground and background runs, which breaks the new CLI contract and can cause tasks requiring full sandbox access to fail unexpectedly.

Useful? React with 👍 / 👎.

aliasMap: {
m: "model"
}
Expand Down
13 changes: 9 additions & 4 deletions plugins/codex/scripts/session-lifecycle-hook.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,16 @@ export const SESSION_ID_ENV = "CODEX_COMPANION_SESSION_ID";
const PLUGIN_DATA_ENV = "CLAUDE_PLUGIN_DATA";

function readHookInput() {
const raw = fs.readFileSync(0, "utf8").trim();
if (!raw) {
return {};
try {
const raw = fs.readFileSync(0, "utf8").trim();
if (!raw) {
return {};
}
return JSON.parse(raw);
} catch (e) {
if (e.code === 'EAGAIN') return {};
throw e;
}
return JSON.parse(raw);
}

function shellEscape(value) {
Expand Down
13 changes: 9 additions & 4 deletions plugins/codex/scripts/stop-review-gate-hook.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,16 @@ const ROOT_DIR = path.resolve(SCRIPT_DIR, "..");
const STOP_REVIEW_TASK_MARKER = "Run a stop-gate review of the previous Claude turn.";

function readHookInput() {
const raw = fs.readFileSync(0, "utf8").trim();
if (!raw) {
return {};
try {
const raw = fs.readFileSync(0, "utf8").trim();
if (!raw) {
return {};
}
return JSON.parse(raw);
} catch (e) {
if (e.code === 'EAGAIN') return {};
throw e;
}
return JSON.parse(raw);
}

function emitDecision(payload) {
Expand Down