Skip to content

Fix /ultracode: imperative directive so the model authors (not ToolSearch-hunts for a tool) - #331

Merged
agentforce314 merged 1 commit into
mainfrom
fix/ultracode-directive-no-tool-hunt
Jun 13, 2026
Merged

Fix /ultracode: imperative directive so the model authors (not ToolSearch-hunts for a tool)#331
agentforce314 merged 1 commit into
mainfrom
fix/ultracode-directive-no-tool-hunt

Conversation

@agentforce314

Copy link
Copy Markdown
Owner

The bug (from a live run)

You ran /ultracode <World Cup task> and the model didn't author anything. It treated ultracode as a skill to invoke:

"I'll invoke the ultracode skill… Let me find the correct skill name."
● ToolSearch (ultracode author save workflow command){"matches": []}
"The ultracode skill is listed but the invocation failed."

The old directive opened with "The user invoked /ultracode — AUTHOR a workflow…", which primed the model to go find/invoke an ultracode tool instead of writing the script itself.

The fix

Rewrite the directive as a blunt imperative that forbids exactly that:

  • Leads with "Your job right now: WRITE a new multi-agent workflow script … and save it to a file with your Write tool."
  • Explicit: there is NO "ultracode" tool/skill/command to invoke or look up — do NOT use ToolSearch, do NOT search for a skill, do NOT call any Workflow tool.
  • Inlines a compact script skeleton (meta + phase + agent + parallel + return) so it doesn't depend solely on reading the template, and still points at deep_research.py.

Validated end-to-end (not just asserted)

Gave a capable agent this exact directive for your World Cup task. It read the template and authored .claude/workflows/wc26-watch-guide.py, which:

  • parses (extract_meta → name + 3 phases),
  • registers as /wc26-watch-guide,
  • and runs through the real engine with a fake runner: ok=True, 3 phases (Search/Research/Write), 4 agents (1 search → 2 parallel research → 1 write), expected result. No imports, correct primitive signatures.

(That file is gitignored, so it stays as a working local command and isn't in this PR.)

Honest caveat

This makes the directive followable and proven-runnable for a capable model. Your earlier failure was likely a weaker model latching onto "ultracode" as a tool; the new wording removes that affordance, but no prompt can guarantee a weak model authors valid sandboxed Python. The plumbing + a capable-model round-trip are verified.

🤖 Generated with Claude Code

…or, not hunt for a tool

A live /ultracode run failed: instead of authoring the workflow, the model
treated "ultracode" as a skill to invoke — it ran ToolSearch("ultracode …"),
found nothing, and gave up ("the ultracode skill is listed but invocation
failed"). The old directive opened with "The user invoked /ultracode — AUTHOR
…", which primed the model to go *find* an ultracode tool rather than write the
script itself.

Rewrite the directive as a direct imperative that forbids the failure mode:
- Leads with "Your job right now: WRITE a new multi-agent workflow script … and
  save it to a file with your Write tool."
- Explicit: there is NO "ultracode" tool/skill/command to invoke or look up —
  do NOT use ToolSearch, do NOT search for a skill, do NOT call any Workflow tool.
- Inlines a compact script skeleton (meta + phase + agent + parallel + return) so
  it isn't solely dependent on reading the template, and still points at
  deep_research.py for the full pattern.

Validated end-to-end: given this exact directive, a capable agent read the
template and authored .claude/workflows/wc26-watch-guide.py, which parses
(extract_meta), registers as /wc26-watch-guide, and RUNS through the real engine
with a fake runner (3 phases, 4 agents, expected result) — no imports, correct
primitive signatures.

Tests updated to assert the anti-tool-hunt language (ToolSearch / skill / do NOT
run) and the Write-tool imperative.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@agentforce314
agentforce314 merged commit 4806ac8 into main Jun 13, 2026
peroxider pushed a commit to peroxider/clawcodex that referenced this pull request Jun 15, 2026
… authors + saves a /<name>

Follow the actual Claude Code approach: ultracode is triggered by the KEYWORD in a
prompt, never a slash command. Revert the /ultracode slash command (agentforce314#329/agentforce314#330/agentforce314#331)
and route everything through the keyword.

- Remove the /ultracode PromptCommand + its directive from workflows_integration.py;
  bundled_workflow_commands() now contributes only /workflows + /deep-research.
- src/workflow/ultracode.py: the keyword reminder (and the /effort ultracode session
  reminder) now instruct the model to AUTHOR a workflow and SAVE it to
  .claude/workflows/<name>.py (then run via /<name>) — not run it inline. Keeps the
  blunt imperative + inline skeleton + anti-tool-hunt language ("no ultracode tool/
  skill, do NOT use ToolSearch") that a live failure showed is necessary.

The saved file becomes /<name> via load_and_register_workflows, picked up mid-session
by _refresh_workflow_commands (unchanged), so the keyword -> /<name> handoff works
without a restart — like /deep-research.

Tests: assert there is NO /ultracode command (keyword-only); keyword reminder is the
author+save imperative; existing keyword detection / session-mode / refresh / effort
tests still pass. Full sweep: 267 passed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
singlaamitesh pushed a commit to singlaamitesh/clawcodex that referenced this pull request Jul 7, 2026
…-directive-no-tool-hunt

Fix /ultracode: imperative directive so the model authors (not ToolSearch-hunts for a tool)
singlaamitesh pushed a commit to singlaamitesh/clawcodex that referenced this pull request Jul 7, 2026
… authors + saves a /<name>

Follow the actual Claude Code approach: ultracode is triggered by the KEYWORD in a
prompt, never a slash command. Revert the /ultracode slash command (agentforce314#329/agentforce314#330/agentforce314#331)
and route everything through the keyword.

- Remove the /ultracode PromptCommand + its directive from workflows_integration.py;
  bundled_workflow_commands() now contributes only /workflows + /deep-research.
- src/workflow/ultracode.py: the keyword reminder (and the /effort ultracode session
  reminder) now instruct the model to AUTHOR a workflow and SAVE it to
  .claude/workflows/<name>.py (then run via /<name>) — not run it inline. Keeps the
  blunt imperative + inline skeleton + anti-tool-hunt language ("no ultracode tool/
  skill, do NOT use ToolSearch") that a live failure showed is necessary.

The saved file becomes /<name> via load_and_register_workflows, picked up mid-session
by _refresh_workflow_commands (unchanged), so the keyword -> /<name> handoff works
without a restart — like /deep-research.

Tests: assert there is NO /ultracode command (keyword-only); keyword reminder is the
author+save imperative; existing keyword detection / session-mode / refresh / effort
tests still pass. Full sweep: 267 passed.

Co-Authored-By: Claude Opus 4.8 <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