Skip to content

[codex] Add Go-authored custom workflows#677

Merged
dennisonbertram merged 3 commits into
mainfrom
dennisonbertram/go-workflows
Jun 28, 2026
Merged

[codex] Add Go-authored custom workflows#677
dennisonbertram merged 3 commits into
mainfrom
dennisonbertram/go-workflows

Conversation

@dennisonbertram

Copy link
Copy Markdown
Owner

Adds Go-authored workflow bundles with manifest discovery, compile validation, hot registration, and a workflow SDK for phase/log/feedback/question/subworkflow calls.
Wires create_workflow and run_workflow deferred tools plus /v1/script-workflows server setup so agents and API clients can run workflows without restarting harnessd.
Persists and streams structured workflow feedback so parent agents, API clients, and SSE replay can inspect intermediate progress and findings.
Also adds the requested AGENTS/CLAUDE communication note, a workflow implementation plan, and a small ux-feedback-check bundle used to validate workflow UX paths.
Validation: ./scripts/test-regression.sh passed with coveragegate total 84.4%, and workflow UX was smoke-tested through direct API, tmux CLI with gpt-4.1-mini, and direct /v1/runs API.

@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: 69f050c3c6

ℹ️ 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".

if root == "" {
continue
}
return filepath.Join(root, skill, "workflows", req.Name), scope, nil

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Reject traversal in skill-scoped workflow paths

When scope=skill, the raw skill value is joined into the filesystem path. A create_workflow call with a value such as ../../tmp/target escapes the configured skill root; with overwrite set, the later os.RemoveAll(dir) and writes can delete or create files outside the skill directory. Validate the skill name with the same kebab-case rule (or verify the cleaned path remains under root) before joining it.

Useful? React with 👍 / 👎.

Comment on lines +219 to +220
if req.Overwrite {
if err := os.RemoveAll(dir); err != nil {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Validate replacements before deleting the active bundle

For an existing workflow updated with overwrite=true, the old bundle is removed before the replacement source is built. If the new source fails to compile, CreateWorkflow returns an error but the previous on-disk bundle is already gone; because runSourceWorkflow rebuilds from bundle.Dir on each invocation, the previously registered workflow starts failing too. Build and validate in a temporary directory, then atomically swap it into place only after validation succeeds.

Useful? React with 👍 / 👎.

…rkflows

# Conflicts:
#	cmd/harnesscli/tui/model_editor_test.go
#	docs/logs/long-term-thinking-log.md
…rkflows

# Conflicts:
#	cmd/harnessd/bootstrap_helpers_test.go
#	docs/logs/long-term-thinking-log.md
@dennisonbertram dennisonbertram merged commit 860f6e0 into main Jun 28, 2026
1 check 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.

1 participant