Group and triage failed tool calls so recurring Forge failures become fixes or targeted follow-up tasks. This improves reliability for debates, analyses, and autonomous research loops.
tool_calls with status = error and group by skill_id plus normalized error_message.q-cc0888c0004a - Agent Ecosystem quest66bd4bd4-7c04-41c2-b332-74b1a9baf7dc.AGENTS.md, CLAUDE.md, this task spec, quest spec quest_agent_ecosystem_spec.md, and alignment-feedback-loops.md.tool_calls has 389 rows with status='error' and 27,040 rows with status='success'.skill_id and error pattern, apply narrow local compatibility fixes for deterministic argument-shape failures, and document remaining caller/upstream causes plus before/after untriaged counts.docs/code_health/tool_call_failure_triage_2026-04-21.md with the latest 50 failed tool_calls grouped by skill_id and error pattern.scidex/forge/tools.py: query aliases and empty input handling for PubMed, Semantic Scholar, ClinicalTrials, research topic, Open Targets, KEGG, AlphaFold, paper figures, and paper corpus ingest.skills.input_schema and skills.example_input.python3 -m py_compile scidex/forge/tools.py; targeted Python smoke checks for empty/alias calls returned structured empty results without increasing status='error' rows.9d3be8ecb is already pushed and targeted to the expected three task files.research_topic(query=..., max_papers="0"); patched research_topic to accept max_papers/max_results and coerce numeric string limits.python3 -m py_compile scidex/forge/tools.py; targeted smoke checks including research_topic(query="APOE glia", max_papers="0") returned an empty evidence brief without raising argument-contract errors.status='error', 27,295 rows with status='success'; original required 50-row batch remains triaged and the extra discovered mode is documented in the code-health addendum.max_papers="0" avoided argument errors but still allowed ClinicalTrials.gov to return default results.research_topic so an evidence limit of zero returns empty PubMed, Semantic Scholar, and ClinicalTrials lists without provider calls.python3 -m py_compile scidex/forge/tools.py; research_topic(query="APOE glia", max_papers="0") returned 0 total evidence and no provider rows.origin/main; it remains at 863577266, so the task branch is still based on the current main snapshot.python3 -m py_compile scidex/forge/tools.py.research_topic, and research_topic(query="APOE glia", max_papers="0"); zero-limit research returned 0 PubMed papers, 0 Semantic Scholar papers, and 0 ClinicalTrials rows.psql prompted for a password in this harness, so live counts were checked through scidex.core.database.get_db(): 390 error rows and 27,404 success rows. The original 50-row triage batch remains documented, leaving 339 untriaged rows by the report accounting.data/papers/*.json, deleted scripts/cache_paper_fulltext.py, and an api.py quality-gate regression.origin/main (19cbede2b) and limited the corrected branch content to the intended Forge triage files: scidex/forge/tools.py, docs/code_health/tool_call_failure_triage_2026-04-21.md, and this spec.api.py, data/papers/*.json, scripts/cache_paper_fulltext.py, and unrelated specs from the corrected task commit.python3 -m py_compile scidex/forge/tools.py; signature checks for all alias parameters passed; smoke checks for empty calls and research_topic(query="APOE glia", max_papers="0") passed without provider calls.scidex.core.database.get_db(): 390 error rows and 27,618 success rows. The original 50-row batch plus 1 retry addendum row leaves 339 untriaged failed calls by report accounting.main, including unrelated clinical-trial script deletions and unrelated spec edits.main (3b914af08) plus only the Forge triage deliverable. The code-health triage report already exists on current main, so the repaired diff is limited to scidex/forge/tools.py and this spec.api.py, data/papers/*.json, scripts/cache_paper_fulltext.py, backfill_figures.py, or the quality-gate spec.python3 -m py_compile scidex/forge/tools.py; targeted smoke checks for alias/empty inputs passed, including zero-limit research_topic returning no PubMed, Semantic Scholar, or ClinicalTrials rows.0cacff47d87d0c33d (squash-merge of task 66bd4bd4) committed all prior work (tools.py fixes, code-health report, spec work-log) to origin/main.gene_symbol alias mismatches from chembl_drug_targets, string_enrichment, and methbase_disease_methylation.gene_symbol alias support:chembl_drug_targets(target_gene=None, gene_symbol=None, max_results=10) — accepts gene_symbol as upstream caller conventionstring_enrichment(gene_symbols=None, gene_symbol=None, species=9606) — accepts single-gene gene_symbol kwargmethbase_disease_methylation(disease, gene=None, gene_symbol=None, max_results=10) — accepts gene_symbol alias for gene
[] on empty calls.chembl_drug_targets(gene_symbol='APOE') → 10 items; string_enrichment(gene_symbol='APOE') → 20 items; methbase_disease_methylation('Alzheimer', gene_symbol='APOE') → 10 items; all without argument errors.python3 -m py_compile scidex/forge/tools.py → ✓ Syntax OK.gene_symbol patterns. These 9 will no longer recur. Remaining 386 errors include older all-time patterns (pubmed_search query=missing, paper_corpus_ingest type errors, alphafold_structure alias, etc.) already documented in the code-health report.{
"requirements": {
"coding": 7,
"reasoning": 6,
"safety": 9
}
}