Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.modelcode.ai/llms.txt

Use this file to discover all available pages before exploring further.

Once you’ve reviewed and approved a milestone, click Approve & Start to kick off the agent. It initializes a sandbox, plans the tasks, and begins executing. You don’t need to do anything else. Approve and start milestone

Milestones & Tasks

How to review and approve milestones before starting

How the Agent Works

The milestone agent runs through a series of stages:
  1. Initialization: Sets up the sandbox environment
  2. Analysis: Examines the source project files
  3. Planning: Breaks the milestone into individual tasks, determines dependencies and execution order
  4. Implementation: Executes each task in sequence, writing and committing code after each one
  5. Verification: Builds the project and runs tests
  6. PR Creation: Generates a pull request with all the changes

Watching Tasks Execute

Once planning finishes, a Tasks tab appears showing the task count (e.g., “Tasks 7”). Each task is listed with a Task ID, title, and status badge (Ready, In Progress, Completed, or Failed). Tasks executing with stage indicator Tasks execute in dependency order. The progress bar fills in as tasks complete. Milestone at 71% with 5 tasks completed Task detail drawer for a running task After implementation, the agent runs a verification pass (building and running tests): Testing stage at 85% with all implementation tasks completed When everything passes, a pull request is generated automatically. All tasks completed, generating pull request Pull request ready for review

Reviewing Pull Requests

How to review and merge the generated PR

If Tasks Fail

If one or more tasks fail, the milestone shows a Pending Review (Fail) status. A PR is still created with whatever succeeded. To retry:
  1. Expand the milestone
  2. Click on the failed task to open its drawer
  3. Click Retry Execute
Tasks that already completed are not re-run.
Note: If you don’t see “Retry Execute,” your account may not have the required permissions. In that case, you’ll see a Contact Us link instead.
If tasks succeeded but PR creation failed, click Retry PR on the milestone to regenerate the pull request without re-running tasks.

Outputs & Debugging

How to review outputs, read transcripts, and debug failures

Adhoc Tasks

Sometimes you need the agent to do something that isn’t part of the original plan. Adhoc tasks let you add custom work to any milestone: fixing something you spotted during PR review, adding a missing utility, or adjusting generated code.

When to Use Adhoc Tasks

  • During PR review: You notice a missing edge case or a file that needs adjustment
  • After a milestone completes: Something was missed that should be part of this milestone
  • One-off fixes: Small, targeted changes that don’t warrant a full re-plan

Creating an Adhoc Task

  1. Open the milestone and click + Add Task in the Tasks tab (visible once the milestone has tasks)
  2. A drawer opens with two fields:
    • Title: A short name for the task (required)
    • Description: A markdown editor pre-populated with a template
Adhoc task form with title and description template
  1. Fill in the description. Be specific: tell the agent exactly what to change, where, and what “done” looks like. Here’s an example of a well-written adhoc task:
### Task Description
The generated `auth.py` middleware is checking for the `Authorization` header
but not handling the case where the token is expired. Add token expiration
validation using the `jwt.decode()` expiry check, and return a 401 with
a clear error message when the token is expired.

### Scope
- `src/middleware/auth.py` (main change)
- `tests/test_auth.py` (add a test for expired tokens)

### Definition of Done
- Expired tokens return HTTP 401 with `{"error": "Token expired"}`
- A new test case covers this scenario
- Existing tests still pass
The more context you give (file paths, function names, expected behavior), the better the result. Vague descriptions like “fix the auth” will produce vague results.
  1. Click Create Task

Reviewing Before Execution

After creating the task, Morph reviews it for conflicts with the existing plan:
  1. Click Review. Morph checks your task against the milestone context
  2. If there are recommendations, they appear in the editor. Review and adjust as needed.
  3. If everything looks good, click Execute Task
You can also click Double check? to run the review again if you’ve made changes.

Progress Monitoring

While tasks are running, Morph shows real-time progress at multiple levels. The page updates automatically, so you can just leave it open and watch.

Milestone-Level Progress

The milestone card on the roadmap shows:
  • Progress bar: Fills as tasks complete, with a percentage (e.g., 71%)
  • Status badge: Updates as the milestone moves through its lifecycle (Not Started, In Progress, Pending Review, Merged)

Task-Level Progress

The Tasks tab shows a live view of all tasks in the milestone. Each task shows its current status badge (Ready, In Progress, Completed, or Failed), updating in real time as the agent works through them.

Tips

  • You don’t need to watch. The agent runs autonomously. You can navigate away and come back later. Progress is saved.

Outputs & Debugging

How to review outputs, read transcripts, and debug failures

Milestones & Tasks

The milestone lifecycle and task types

Reviewing Pull Requests

How to review and merge the generated PR

Creating Rules

Encode preferences for better results