fix: Multi-task plan processing and model compatibility improvements (v0.1.2) #4
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.
This PR fixes a critical bug in
ghcralph runand adds model compatibility improvements, preparing for v0.1.2 release to npm.🐛 Critical Bug Fix: Multi-Task Plan Processing
Problem:
ghcralph run --file PLAN.mdonly processed the first task then exited, insteadof processing all pending tasks in the plan file.
Root Cause: The
runcommand had no outer loop to continue processing remaining tasks afterthe first task completed.
Solution (Option A from remediation plan):
while (currentTask)loop that processes ALL pending tasksmaxRetriesPerTask(default: 2)✨ New Features
--pause-between-tasksmaxRetriesPerTaskconfigautoPushconfig[ACTION:STUCK]ghcralph initnow fetches available models from Copilot SDK🔧 Technical Changes
Core Multi-Task Loop (
src/commands/run.ts)createTaskCheckpoint()andcreateFailureCheckpoint()loadPreviousTaskResults()andappendTaskResult()Prompt Engineering (
src/core/context-builder.ts)HONESTY_GUIDANCEsection encouraging agents to document blockers instead of falsecompletion claims
New STUCK Action (
src/core/response-parser.ts,src/core/action-executor.ts)Model Compatibility (
src/integrations/copilot-agent.ts,src/commands/init.ts)listAvailableModels()and staticfetchAvailableModels()using SDK'slistModels()API
ghcralph initdynamically fetches models instead of hardcoded list📁 Files Changed (24 files, +1924/-159 lines)
Core Changes:
src/commands/run.ts- Core multi-task loop fixsrc/commands/init.ts- Dynamic model fetchingsrc/core/config-schema.ts- New config optionssrc/core/checkpoint-manager.ts- Task-level checkpointssrc/core/git-branch-manager.ts- Push to remotesrc/core/progress-tracker.ts- Multi-task progress trackingsrc/core/context-builder.ts- Honesty guidance in promptsrc/core/response-parser.ts- STUCK action typesrc/core/action-executor.ts- STUCK action handlingsrc/integrations/copilot-agent.ts- Model listing methodsTests:
src/core/model-compatibility.test.ts- New parameterized tests (17 test cases)src/integrations/copilot-agent.test.ts- listModels testsDocumentation:
README.md- Updated features, config options, run optionsdocs/architecture.md- STUCK action, updated issues tabledocs/cookbook.md- Multi-task processing, STUCK troubleshooting✅ Validation
npm run typecheck✅npm test✅ (305 tests passing, +20 new tests)npm run build✅📚 Documentation Updates
--pause-between-tasks, new config options🔗 Related