FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat(codex): add reusable Codex coding agent workflows by ActivePeter · Pull Request #7205 · simstudioai/sim · GitHub

feat(codex): add reusable Codex coding agent workflows - #7205

Open
ActivePeter wants to merge 1 commit into
simstudioai:mainfrom
ActivePeter:feat/codex-workflow-block
Open

feat(codex): add reusable Codex coding agent workflows#7205
ActivePeter wants to merge 1 commit into
simstudioai:mainfrom
ActivePeter:feat/codex-workflow-block

Conversation

ActivePeter commented Aug 28, 2026
edited
Loading

Copy link
Copy Markdown

Summary\n\n- add a first-class Codex Coding Agent workflow block backed by isolated E2B or Daytona sandboxes\n- reuse one logical agent, retained repository checkout, and native Codex thread across multiple workflow steps and loop rounds\n- support Plan and Create PR modes with bounded event parsing, output redaction, branch reuse, and pull request updates\n- add Kustomize-style sparse configuration overlays in System → Workspace → Workflow → Agent → Step order\n- keep stable repository/runtime configuration out of step sidebars while allowing reasoning effort as a step-level override\n- preserve agent identity and configuration through collaboration, duplication, workflow copy, and workspace fork flows\n- add database configuration fields, migration, generated schema snapshot, documentation, and sandbox image builders\n\n## Security\n\n- Codex uses user-provided OpenAI BYOK credentials\n- GitHub credentials remain user-only inputs and are not included in inherited configuration\n- each logical agent receives an isolated CODEX_HOME\n- model shell network access is disabled by default and must be enabled explicitly\n- command output and repository URLs are redacted before workflow output projection\n\n## Validation\n\n- rebased onto upstream v0.8.13\n- bun run type-check\n- 24 focused Vitest files, 649 tests passed\n- bun run check:migrations\n- bun run check:api-validation:strict\n- bun run docs-manifest:check\n- bun run docs:check\n- Codex canvas sentence validation\n- manual browser verification of Workspace, Workflow, Agent, and Step inheritance plus collaborative mirror persistence

vercel Bot commented Aug 28, 2026

Copy link
Copy Markdown

@ActivePeter is attempting to deploy a commit to the Sim Team on Vercel.

A member of the Team first needs to authorize it.

greptile-apps Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a reusable Codex coding-agent block with layered configuration, execution-scoped sandbox sessions, Plan and Create PR modes, workflow-copy support, settings UI, persistence, and documentation.

  • Adds E2B and Daytona-backed Codex execution with serialized turns, bounded event parsing, credential separation, redaction, and PR delivery.
  • Adds Workspace → Workflow → Agent → Step configuration overlays and database fields.
  • Adds logical-agent selection, collaboration persistence, duplication/fork handling, and canvas presentation.
  • Adds focused tests, sandbox image builders, generated schema metadata, and user documentation.

Confidence Score: 4/5

The PR should not merge until duplicated and forked shared-agent references are remapped consistently with their copied Codex configuration.

Workflow copy paths assign new block IDs and move block-ID-keyed Codex configuration to those IDs, but explicit agentId references remain tied to source blocks, splitting copied agent groups and resolving the wrong settings.

Files Needing Attention: apps/sim/lib/workflows/persistence/duplicate.ts; apps/sim/ee/workspace-forking/lib/copy/copy-workflows.ts

Important Files Changed

Filename Overview
apps/sim/executor/handlers/codex/codex-handler.ts Resolves layered Codex inputs and dispatches execution through reusable agent sessions.
apps/sim/executor/handlers/codex/cloud/authoring.ts Implements isolated repository authoring, Git validation, bounded diff capture, push, and PR create/update behavior.
apps/sim/executor/handlers/codex/core/session.ts Adds execution-owned sandbox pooling and per-agent serialized Codex turns.
apps/sim/lib/codex/config.ts Defines sparse overlay parsing, precedence, compaction, and copied-agent configuration-key remapping.
apps/sim/lib/workflows/persistence/duplicate.ts Remaps workflow Codex configuration keys during duplication but leaves explicit agentId subblock references pointing to source block IDs.
apps/sim/ee/workspace-forking/lib/copy/copy-workflows.ts Applies the same mismatched configuration-key versus subblock-reference remapping during workspace fork and promotion.
packages/db/migrations/0309_codex_configuration_layers.sql Adds nullable JSONB configuration columns for workspace and workflow Codex overlays.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  W[Workspace defaults] --> F[Workflow defaults]
  F --> A[Agent settings]
  A --> S[Step override]
  S --> H[Codex handler]
  H --> P{Mode}
  P -->|Plan| R[Reusable isolated checkout]
  P -->|Create PR| C[Reusable branch and Codex thread]
  C --> G[Credentialed commit and push]
  G --> PR[Create or update pull request]
Loading

Reviews (1): Last reviewed commit: "feat(codex): add reusable coding agent w..." | Re-trigger Greptile


await tx
.update(workflow)
.set({ codexConfig: remapCodexWorkflowAgentIds(source.codexConfig, blockIdMapping) })

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Copied agent references diverge

When a duplicated workflow has Codex blocks sharing an agent through another block's ID, this remaps the configuration key to the copied block ID while leaving the agentId subblock pointed at the source block. The copied group therefore splits, and dependent blocks resolve defaults or stale embedded settings instead of the copied agent configuration. The fork create and replace paths in copy-workflows.ts have the same mismatch.

Knowledge Base Used: Workflow authoring and rendering


function AgentColorDot({ color }: { color: string }) {
return (
<span

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Agent color bypasses styling

AgentColorDot assigns its background color through a direct inline style on every rendered agent badge. This bypasses the repository's required Tailwind/CSS-variable styling path and makes the dynamic color inconsistent with normal component styling.

Context Used: Global coding standards that apply to all files (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@@ -0,0 +1 @@
export { AgentSessionSelector } from './agent-session-selector'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Barrel uses relative path

This new apps/sim barrel uses a relative export even though application imports and re-exports must follow the established @/ alias convention. Keeping the absolute path here avoids introducing an exception that complicates refactors and import enforcement.

Suggested change
export { AgentSessionSelector } from './agent-session-selector'
export { AgentSessionSelector } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/agent-session-selector/agent-session-selector'

Context Used: Import patterns for the Sim application (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

ActivePeter force-pushed the feat/codex-workflow-block branch from 93d995c to fa1b75c Compare August 28, 2026 07:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

1 participant


Back | FazBrowse Home | New Git URL