Skip to content

Add runpane pane orchestration CLI#256

Merged
parsakhaz merged 3 commits into
mainfrom
codex/runpane-pane-orchestration
Jun 17, 2026
Merged

Add runpane pane orchestration CLI#256
parsakhaz merged 3 commits into
mainfrom
codex/runpane-pane-orchestration

Conversation

@parsakhaz

Copy link
Copy Markdown
Member

Summary

Closes #252.

Adds a stable runpane orchestration surface for agents:

  • adds runpane repos list and runpane panes create
  • supports --initial-input plus the agent-friendly --prompt alias
  • derives Node, Python, shared TS types, and docs from the shared runpane contract
  • routes daemon-backed commands through explicit runpane:* IPC handlers
  • creates terminal panels with optional first-message seeding for built-in agent templates

Visual Overview

flowchart LR
  subgraph Before["Before: no stable CLI contract"]
    A["Agent wants to start issue work"] --> B{"How do I make a pane?"}
    B --> C["Manual/UI-only path"]
    C --> D["No reliable repo/pane/first-message automation"]
  end

  subgraph After["After: contract-backed orchestration"]
    E["Agent calls runpane CLI"] --> F["Shared contract<br/>repos list<br/>panes create"]
    F --> G["Generated Node/Python clients"]
    G --> H["Daemon IPC<br/>runpane:repos:list<br/>runpane:panes:create"]
    H --> I["Pane creates project/session/panel<br/>and seeds initial input"]
  end
Loading

Truth statement: agents get a small generated command surface, while Pane still owns validation and UI mutations through the running daemon.

Term note: IPC here means the app-internal message path between the runpane wrapper and the running Pane daemon.

Matching Excalidraw source is saved locally at /tmp/codex-pr-diagrams/runpane-pane-orchestration/runpane-pane-orchestration.excalidraw.

Testing

Passed:

  • pnpm run generate-runpane-contract
  • pnpm run test:runpane-contract
  • python3 -m compileall -q packages/runpane-py/src/runpane
  • pnpm --filter runpane typecheck
  • pnpm --filter runpane lint
  • pnpm typecheck
  • pnpm lint
  • pnpm --filter main exec vitest run src/ipc/runpane.test.ts
  • pnpm --filter main exec vitest run src/core/importBoundary.test.ts
  • pnpm --filter main exec vitest run
  • pnpm run build:main
  • pnpm run test:runpane-package-smoke
  • Node CLI help/parse smoke for panes create --prompt
  • Python CLI parse smoke for panes create --prompt

Blocked locally:

  • pnpm build reaches frontend/main build, then fails in Electron packaging/native rebuild in this local environment. The machine is on Node v20.19.3 while the repo requires >=22.14.0, and the native rebuild for msgpackr-extract rejects -m64 on linux arm64.
  • Live headless daemon smoke is blocked by the same local native module/display constraints, including missing rebuilt better_sqlite3.node.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e9616d7b5b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +83 to +85
const result = await invokeDaemon<PaneCreateResult>('runpane:panes:create', [request], {
paneDir: parsed.paneDir,
timeoutMs: (parsed.timeoutMs ?? 120_000) + 10_000,

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 Scale daemon timeout for multi-pane creates

When --from-json contains multiple panes, the daemon handler processes normalized.panes sequentially and applies timeoutMs to each createSessionAndWait call, but this client RPC timeout is only one pane timeout plus 10s for the entire request. Two panes that each finish within the documented per-pane timeout can still make the wrapper abort before the daemon returns; scale the RPC timeout by request.panes.length or otherwise account for the whole batch.

Useful? React with 👍 / 👎.

@parsakhaz parsakhaz merged commit 6fdd196 into main Jun 17, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: let runpane create panes and seed agent tool tabs

1 participant