Skip to content

Fix dead TaskMetadata.mcp_log_dir ref and outdated CLI name in prompt#15

Open
dgjszy wants to merge 2 commits into
project-numina:mainfrom
dgjszy:fix/task-mcp-log-dir-and-prompt-cli-name
Open

Fix dead TaskMetadata.mcp_log_dir ref and outdated CLI name in prompt#15
dgjszy wants to merge 2 commits into
project-numina:mainfrom
dgjszy:fix/task-mcp-log-dir-and-prompt-cli-name

Conversation

@dgjszy

@dgjszy dgjszy commented May 27, 2026

Copy link
Copy Markdown

Summary

Two small fixes that surfaced while running the autosearch pipeline end-to-end on a Minif2f problem.

1. scripts/task.pyAttributeError: 'TaskMetadata' object has no attribute 'mcp_log_dir'

In fd4100b ("Integrate autosearch prompt set and per-task CLI log plumbing") the mcp_log_dir / mcp_log_name fields were removed from TaskMetadata, and the corresponding normalize block in __post_init__ was removed. During a later merge with the safe_verify branch, the normalize line if self.mcp_log_dir: self.mcp_log_dir = Path(self.mcp_log_dir).resolve() was reintroduced — but the field itself was not, so every TaskMetadata(...) construction now crashes.

Repro (on main, before this fix):

python -m scripts.run_claude run path/to/file.lean --prompt-file prompts/prompt_complete_file.txt
# AttributeError: 'TaskMetadata' object has no attribute 'mcp_log_dir'

This blocks run / batch / from-folder — i.e., the entire scripts/run_claude CLI.

2. prompts/prompt_complete_file.txt — references a script that does not exist

The prompt instructs the agent three times to python skills/cli/diagnostic.py FILE, but the actual file is skills/cli/lean_check.py (there is no diagnostic.py in skills/cli/). The Claude agent usually adapts, but a strict reading fails and the instruction is misleading.

Side note (not changed here): the same prompt also says "Errors mean \"has_error\": true" — lean_check.py actually returns okay: false (no has_error key). I left that alone to keep the diff focused; happy to fix in a follow-up if maintainers want.

Test plan

  • Reproduced Add isolate field for parallel MCP session support #1 by running python -m scripts.run_claude run ... on main — confirmed AttributeError
  • Ran the same command after the fix on a Minif2f problem (algebra_sqineq_2atp2bpge2ab) — agent completed in 1 round (nlinarith [sq_nonneg (a - b)]), lean_check.py verified, exit 0
  • grep -rn 'mcp_log_dir' scripts/ returns no hits after the fix
  • grep -rn 'skills/cli/diagnostic' . returns no hits after the fix

🤖 Generated with Claude Code

dgjszy and others added 2 commits May 27, 2026 19:48
The mcp_log_dir / mcp_log_name fields were removed from TaskMetadata
in fd4100b, but a leftover `Path(self.mcp_log_dir).resolve()` line in
__post_init__ was reintroduced during a later merge with the
safe_verify branch. Every invocation of `python -m scripts.run_claude
{run,batch,from-folder}` then died with AttributeError: 'TaskMetadata'
object has no attribute 'mcp_log_dir'.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The prompt referenced `skills/cli/diagnostic.py` (which does not
exist) instead of the actual `skills/cli/lean_check.py`. The agent
generally adapts, but the reference is misleading and a strict
following of the prompt fails.

Co-Authored-By: Claude Opus 4.7 (1M context) <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