Skip to content

skill(writing-agent-relay-workflows): lessons from multi-CLI game test#56

Open
khaliqgant wants to merge 3 commits into
mainfrom
skill/writing-workflows-game-lessons
Open

skill(writing-agent-relay-workflows): lessons from multi-CLI game test#56
khaliqgant wants to merge 3 commits into
mainfrom
skill/writing-workflows-game-lessons

Conversation

@khaliqgant
Copy link
Copy Markdown
Member

Summary

Four additions to the writing-agent-relay-workflows skill, surfaced by running a real multi-turn workflow end-to-end across claude, codex, and opencode as peer players.

  • New coordination shape: Per-turn interactive spawn. A third row in the Conversation/Pipeline table. Interactive PTY agents (no preset), but each step is bounded to one turn that exits when its file/message is produced. Use when turns are short and well-defined; avoids the idle-detection-vs-wait-for-event race that bites long-running interactive agents.

  • Idle-detection caveat at top of Chat-Native Coordination Recipes. The runtime's ~30s idle threshold beats every recipe below — Q/A, Broadcast/Ack, Peer Review, Hand-Off all encode a wait. Two handling options:

    1. Per-agent escape hatch: idleThresholdSecs on the agent (default 30s; 0 disables). Pairs with the SDK JSDoc expansion in AgentWorkforce/relay#TBD.
    2. Restructure to Per-turn interactive spawn (above) when the whole flow is turn-taking.
  • New Common Mistakes row: LLM-as-oracle anti-pattern. Observed in the wild: an LLM oracle drove timing with shell sleep 30 calls because PTY agents have no real wait API. If the comparison is computable (guess vs secret, test pass/fail, regex match), grade it deterministically. LLMs should produce, not adjudicate fixed rules.

  • Counterweight to "Workflows Repair Before They Fail." Skip the repair step when the gate sits downstream of deterministic work and has no agent-fixable failure mode. Otherwise the workflow burns a spawn cycle (and often a follow-on idle-timeout wait) on a guaranteed no-op.

Test plan

  • Authoritative source for the lessons: a real captured run in AgentWorkforce/workflowstests/guessing-game/workflow.ts — which exhibited all four issues before the fixes.
  • No source files renamed/moved; only skills/writing-agent-relay-workflows/SKILL.md modified (+21 lines).
  • Reviewer sanity-check: read the new Chat-Native idle-detection block (around line 1462) — does the "two handling options" framing land?

🤖 Generated with Claude Code

khaliqgant and others added 2 commits May 20, 2026 12:19
… test

Four additions surfaced by running a real multi-turn, multi-CLI workflow
end-to-end (claude/codex/opencode peer guessing game):

- New coordination shape "Per-turn interactive spawn" — interactive PTY
  per turn rather than one long-running session. Avoids the
  idle-detection-vs-wait-for-event race that bites long-running
  interactive agents in turn-taking flows.

- New caveat at top of Chat-Native Coordination Recipes: the runtime's
  ~30s idle threshold beats "wait for X" / "exit on GAME_OVER" task
  prompts. Every chat-native recipe encodes a wait, so this affects all
  of them. Includes the log symptom to watch for.

- New Common Mistakes row: making an LLM agent the judge/oracle for
  fixed-rule comparisons. Observed in the wild: claude-as-oracle drove
  timing with shell `sleep 30` calls because PTY agents have no real
  wait API. If the comparison is computable, grade deterministically.

- Counterweight to "Workflows Repair Before They Fail": skip the repair
  step when the gate sits downstream of deterministic work and has no
  agent-fixable failure mode. Otherwise the workflow burns a spawn
  cycle on a guaranteed no-op.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…e hatch

Augment the new Chat-Native Coordination Recipes idle-detection caveat
with two explicit handling options: (1) per-agent idleThresholdSecs
override (already supported by the builder; default 30s; 0 disables),
and (2) restructure to Per-turn interactive spawn.

(1) is the lower-friction option for the common case "this one
reviewer/grader waits long stretches on channel events" — no DAG reshape
needed. (2) is the right answer when the whole flow is turn-taking.

Pairs with AgentWorkforce/relay JSDoc expansion that makes
idleThresholdSecs discoverable in the SDK builder docs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 20, 2026

Warning

Rate limit exceeded

@khaliqgant has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 7 minutes and 31 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: adf1ca6b-1277-4886-88c9-25e86589d842

📥 Commits

Reviewing files that changed from the base of the PR and between ce092ce and 48ed07a.

📒 Files selected for processing (2)
  • prpm.json
  • skills/writing-agent-relay-workflows/SKILL.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch skill/writing-workflows-game-lessons

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

…ssons

Bumps the writing-agent-relay-workflows package version to match the
content additions in this branch (per-turn coordination shape, idle-
detection caveat, LLM-as-oracle anti-pattern, repair-step counterweight,
idleThresholdSecs escape-hatch documentation).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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