Skip to content

kind=text drops case fixtures, and the text-only algorithm hint leads users into that path #1251

Done

Description

@Birfy

Problem

kind=text has no workspace, so its runner never stages case fixtures. The call is only {skill} plus {prompt}:

def run(skill: str, task: Task) -> str:
    return model(template.format(skill=skill, prompt=task.prompt))

The packaged text demo already knows this: demo.py _text_rows inlines the CSV in the prompt because "kind=text has no workspace fixtures." The default skill_dir / skill_library demo cases do the opposite — prompt is What is the total? and the CSV lives in fixtures.data.csv, which a WorkspaceAgent can see.

build_tasks still loads those fixtures into task.meta, and plan / algorithms run report ok with no note. A real run then asks the model "What is the total?" plus a skill that tells it to read data.csv from a working directory the plain Completion does not have. The numbers never appear in the prompt, so reward stays 0 and it looks like the algorithm failed to learn.

The kind-mismatch error for a text-only card on a skill_dir actively points users down this path, and does not mention the cases file:

to run ace on one file, target it as text: agentdescent algorithms run ace <dir>/SKILL.md --kind text

Following that hint and reusing the demo (or any skill-dir) cases.jsonl gives a green plan and a run that cannot see the data. That is the shortest path the CLI itself suggests for "try a named text card on my skill."

Reproduction

main b4647375 (0.11.0, after #1240 / #1227), fresh clone, pip install -e ".[mcp]":

agentdescent demo --dir ./demo

agentdescent algorithms run ace ./demo/csv-total ./demo/cases.jsonl \
  --agent openai_compatible \
  --model deepseek-v4-flash \
  --base-url https://ark.cn-beijing.volces.com/api/coding/v3 \
  --rounds 1 --workers 1 --out /tmp/ace.spec.json
# error: algorithm 'ace' applies to kind ['text'], not 'skill_dir';
#   'ace' is text-only: it reads a single text file, not a skill_dir target;
#   for kind 'skill_dir': ['archive_selection', 'evoskill'] (...);
#   to run ace on one file, target it as text:
#   agentdescent algorithms run ace ./demo/csv-total/SKILL.md --kind text

# Follow the hint, reuse the same cases:
agentdescent algorithms run ace ./demo/csv-total/SKILL.md ./demo/cases.jsonl \
  --kind text --agent openai_compatible \
  --model deepseek-v4-flash \
  --base-url https://ark.cn-beijing.volces.com/api/coding/v3 \
  --rounds 1 --workers 1 --out /tmp/ace.spec.json
# ok: text .../SKILL.md  algorithm=ace (mechanism_microport)
# plan: 12 tasks (4 held out), 1 round x 1 worker, up to 19 agent calls
# (no warning about fixtures)

On that planned spec, the first task is prompt='What is the total?' with meta['fixtures']['data.csv'] holding id,amount\n1,98\n.... The text runner's model input is SKILL.md + "\n\nWhat is the total?". The CSV body is not in that string ('1,98' in rendered is false). data.csv is only mentioned as a filename in the skill.

Contrast: agentdescent demo --algorithm ace uses _text_rows (CSV fenced inside prompt) and the offline card learns COLUMN: amount.

The same trap applies to gepa / dgm / skillopt / rrsi (every text-only card) and to MCP algorithm_spec with the same arguments.

Expected

  • plan / algorithms run / MCP algorithm_spec must not look clean when kind=text and the cases have a fixtures column that the text runner will not inject. Either refuse, or warn in notes with a repair: inline the file contents into each prompt, or use the cases from agentdescent demo --algorithm <name> --dir ....
  • The kind-mismatch hint should mention that skill_dir cases are workspace fixtures and cannot be reused as-is for --kind text.

Suggested fix

One PR, in compose / plan and the kind-mismatch string in agentdescent/algorithms/__init__.py:

  • When kind=text and any task has meta["fixtures"] whose body is not already in task.prompt, print a clear notes warning (or refuse) naming the dropped files and the repair above.
  • Extend the text-only hint so it does not stop at .../SKILL.md --kind text; say the skill_dir cases.jsonl will not carry fixtures into a text prompt, and point at demo --algorithm NAME --dir cases (or inlining).
  • Optional, still in scope: append unused fixtures to the formatted text prompt as fenced files, so the hinted command can actually show a reward. If that lands, keep the warning for the current "drop silently" behaviour out of the tree and pin the injection with a test.
  • Pin with a test (kind-mismatch message + plan notes, and the rendered prompt if injection is added). demo --algorithm ace / _text_rows stays unchanged.

Acceptance

  • Following the kind-mismatch hint with the skill_dir cases.jsonl either makes the fixture body visible to the text model, or is refused/warned with a repair that names inlining / demo --algorithm NAME --dir cases.
  • plan on kind=text plus fixture-only prompts no longer returns a clean ok with empty warnings/notes about the dropped files.
  • agentdescent demo --algorithm ace still inlines the CSV and still learns offline.
  • A test pins the hint and the plan note (and the rendered prompt, if fixtures are injected) so this cannot regress silently.

Activity

  1. added
    bug
    area:cli
    on Nov 24, 2026
  2. added
    agent-working
    on Nov 24, 2026
  3. HugoXK commented on Nov 24, 2026

    @HugoXK
    Collaborator

    Claiming this one.

    Branch agent/1251-text-fixtures, base 22ea7528915a761c579dc4c7f47d8444c159cd8a (live main). Draft PR follows in this session; red test first on that base.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

agent-workingarea:clibug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions