Skip to content

Add runnable persona bridge - #33

Merged
khaliqgant merged 2 commits into
mainfrom
codex/workforce-send-message-bridge
May 1, 2026
Merged

khaliqgant merged 2 commits into
mainfrom
codex/workforce-send-message-bridge

Conversation

@khaliqgant

Copy link
Copy Markdown
Member

Summary

  • add @agentworkforce/harness-kit useRunnablePersona/useRunnableSelection with non-interactive sendMessage execution
  • map persona selections onto claude --print, codex exec, and opencode run, with captured stdout/stderr, progress, timeout/cancel, env/input plumbing, and temporary config cleanup
  • document the new bridge and bump @relayfile/local-mount to 0.6.1 so main's includeGit launch option typechecks

Validation

  • corepack pnpm --filter @agentworkforce/harness-kit test
  • corepack pnpm run check

@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: 4bc84e5296

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

cancelled = true;
child.kill('SIGTERM');
};
options.signal?.addEventListener('abort', abort, { once: true });

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 Handle pre-aborted signals before spawning child

spawnCapture only subscribes to 'abort' events, but it never checks options.signal?.aborted before spawning. If callers pass an already-aborted signal (or a merged signal that is already aborted), Node does not re-fire the abort event for this late listener, so the harness process still starts and can run side effects even though cancellation was requested up front.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in 526c16c. sendMessage() now detects the merged signal before materializing config files or spawning, returns cancelled, preserves the abort reason, and has a regression test that verifies the fake harness never runs when the signal is already aborted.

Comment on lines +346 to +349
? setTimeout(() => {
timedOut = true;
child.kill('SIGTERM');
}, options.timeoutSeconds * 1000)

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 Escalate timeout cancellation when child ignores SIGTERM

The timeout path marks timedOut and sends only SIGTERM, then waits for 'exit'/'error' to resolve. If the harness traps or ignores SIGTERM, the promise can hang indefinitely, so timeoutSeconds no longer guarantees completion and callers can block forever. A forced follow-up kill (or watchdog) is needed to make timeout behavior reliable.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in 526c16c. spawnCapture() now starts a forced SIGKILL watchdog after the timeout SIGTERM, clears it on normal exit, and has a regression test with a fake harness that ignores SIGTERM so timeout still resolves.

@khaliqgant
khaliqgant merged commit c57418c into main May 1, 2026
1 check passed
@khaliqgant
khaliqgant deleted the codex/workforce-send-message-bridge branch May 1, 2026 19:11
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