Skip to content

fix(examples): make example 61's CLI usage deterministic - #166

Draft
ling-senpeng13 wants to merge 1 commit into
mainfrom
fix/example-61-deterministic-cli
Draft

fix(examples): make example 61's CLI usage deterministic#166
ling-senpeng13 wants to merge 1 commit into
mainfrom
fix/example-61-deterministic-cli

Conversation

@ling-senpeng13

Copy link
Copy Markdown
Contributor

Example 61 (chained GitHub coding pipeline) reliably failed: agents wrapped compound commands in bash -c (not allowlisted), the instructions themselves dictated a command starting with TMPDIR=$(mktemp -d) that the validator can't accept, the coder had no file-writing command at all, and models invented placeholder cwd paths. Each rejection spiraled into retry loops, tripping the circuit breaker and Conductor's 256 KB workflow-variables limit.

Changes (prompting-only — no SDK code touched):

  • Shared TOOL RULES block for all four CLI stages: pass compound commands directly with shell=true, never wrap in bash -c/sh -c, first word must be an allowed executable, never invent cwd paths
  • Instructed commands rewritten to be validator-legal (mktemp -d as its own step, compounds lead with gh)
  • Coder allowlist gains echo/printf so it can actually write file content

Verified: repeated runs with zero command rejections (previously 10+ per run), and the pipeline completed issue → branch → commit → real PR end-to-end.

Note: full Anthropic-model support additionally needs conductor-oss/conductor#1545 (agent loops on Anthropic models run without history on current servers).

The chained GitHub pipeline failed in a retry loop: models wrapped
compound commands in 'bash -c' (rejected — bash not allowlisted), the
instructed step-3 command itself started with a VAR=$(...) assignment
(also rejected), the coder had no file-writing command in its
allowlist, and models invented placeholder cwd paths.

Add shared TOOL RULES to every CLI stage (no shell wrappers, first
word must be allowlisted, no placeholder cwd), rewrite the instructed
commands to be validator-legal, and allowlist echo/printf for the
coder.
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