Skip to content

Workflow Codex/OpenCode/Cursor phases drop thread.permissionMode #793

Closed

Description

@currentbits

Problem

startWorkflowRun already reads thread.permissionMode and spawnPhaseAgent already has it, but only spawnAgentClaude passes it into buildArgs. Codex, OpenCode, and Cursor workflow phases ignore the thread picker.

Confirmed on origin/main (dc15acba):

  • Codex buildArgs maps mode via codexSandboxFor (plan → --sandbox read-only, bypassPermissions → danger-full-access, else workspace-write). Without the field, phases always get workspace-write.
  • OpenCode buildArgs emits --auto for bypassPermissions / leftover acceptEdits. Without the field, phases never get --auto.
  • Cursor buildArgs uses --mode plan (no --force) for plan, else --force. Without the field, phases always get --force.

Scope

Thread permissionMode through spawnAgentCodex / spawnAgentOpencode / spawnAgentCursor the same way Claude already does. Add argv-evidence tests (fake CLIs dump process.argv) for spawnPhaseAgent and startWorkflowRun.

Out of scope

Activity

  1. currentbits commented on Sep 1, 2026

    @currentbits
    OwnerAuthor

    Confirmed on origin/main (dc15acba): startWorkflowRun already read thread.permissionMode and spawnPhaseAgent already had it, but only spawnAgentClaude passed it into buildArgs. Codex/OpenCode/Cursor phases ignored the picker.

    Fix (this thread): those three spawners now pass permissionMode || "default" into buildArgs, same shape as Claude. spawnPhaseAgent forwards the field it already had.

    Evidence (watched fail first, then pass):

    • electron/test/workflow-permission.test.js: 6/6 pass
      • Codex plan was --sandbox workspace-write, now read-only
      • OpenCode bypassPermissions had no --auto
      • Cursor plan was --force, now --mode plan
    • electron/test/workflow.test.js: 13/13 pass
    • electron/test/workflow-kimi.test.js: 2/2 pass
    • electron/test/permission-modes.test.js: 16/16 pass

    Did not reopen effort (#785) or webSearch (#792). Did not add phase resume (#782).

  2. added
    plan:done
    and removed
    plan:doing
    on Sep 2, 2026
  3. currentbits commented on Sep 2, 2026

    @currentbits
    OwnerAuthor

    Worktree already on origin/main via #840 (ca6c5146). Closing and marking plan:done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    plan:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions