Skip to content

fix: clear directive flags on decomposition failure + dismiss endpoint#6

Merged
gf5901 merged 1 commit into
mainfrom
fix/directive-failure-cleanup
Mar 22, 2026
Merged

fix: clear directive flags on decomposition failure + dismiss endpoint#6
gf5901 merged 1 commit into
mainfrom
fix/directive-failure-cleanup

Conversation

@gf5901
Copy link
Copy Markdown
Owner

@gf5901 gf5901 commented Mar 22, 2026

Summary

  • When run_directive() fails (timeout, agent error, JSON parse failure), the project was left permanently stuck with an active directive, blocking autopilot. Now resets to awaiting_next_directive on any failure path.
  • Adds POST /api/projects/:id/directive/dismiss to manually clear a stuck directive from the UI.

Test plan

  • Verify a failed directive decomposition doesn't block the next autopilot cycle
  • Verify the dismiss endpoint clears active_directive_sk

Made with Cursor

When run_directive() fails (timeout, agent error, parse failure), the
project was left stuck with active_directive_sk set, blocking autopilot
permanently. Now _clear_directive_on_failure() resets the project to
awaiting_next_directive so the next autopilot cycle can proceed.

Also adds POST /api/projects/:id/directive/dismiss for manually
clearing a stuck directive from the UI.

Made-with: Cursor
@gf5901 gf5901 merged commit dfeaa7e into main Mar 22, 2026
4 checks passed
@gf5901 gf5901 deleted the fix/directive-failure-cleanup branch March 22, 2026 06:47
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