Fix /ultracode: imperative directive so the model authors (not ToolSearch-hunts for a tool) - #331
Merged
Merged
Conversation
…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>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bug (from a live run)
You ran
/ultracode <World Cup task>and the model didn't author anything. It treatedultracodeas a skill to invoke: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:
meta+phase+agent+parallel+return) so it doesn't depend solely on reading the template, and still points atdeep_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:extract_meta→ name + 3 phases),/wc26-watch-guide,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