Fix dead TaskMetadata.mcp_log_dir ref and outdated CLI name in prompt#15
Open
dgjszy wants to merge 2 commits into
Open
Fix dead TaskMetadata.mcp_log_dir ref and outdated CLI name in prompt#15dgjszy wants to merge 2 commits into
dgjszy wants to merge 2 commits into
Conversation
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>
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.
Summary
Two small fixes that surfaced while running the autosearch pipeline end-to-end on a Minif2f problem.
1.
scripts/task.py—AttributeError: '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_namefields were removed fromTaskMetadata, and the corresponding normalize block in__post_init__was removed. During a later merge with thesafe_verifybranch, the normalize lineif self.mcp_log_dir: self.mcp_log_dir = Path(self.mcp_log_dir).resolve()was reintroduced — but the field itself was not, so everyTaskMetadata(...)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 entirescripts/run_claudeCLI.2.
prompts/prompt_complete_file.txt— references a script that does not existThe prompt instructs the agent three times to
python skills/cli/diagnostic.py FILE, but the actual file isskills/cli/lean_check.py(there is nodiagnostic.pyinskills/cli/). The Claude agent usually adapts, but a strict reading fails and the instruction is misleading.Test plan
python -m scripts.run_claude run ...onmain— confirmed AttributeErroralgebra_sqineq_2atp2bpge2ab) — agent completed in 1 round (nlinarith [sq_nonneg (a - b)]),lean_check.pyverified, exit 0grep -rn 'mcp_log_dir' scripts/returns no hits after the fixgrep -rn 'skills/cli/diagnostic' .returns no hits after the fix🤖 Generated with Claude Code