diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-03-14 00:33:46 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-03-14 00:33:46 +0000 |
| commit | 6ac15be438e3692cbc2ae2f36ab2d69468fc6372 (patch) | |
| tree | f0fded632c7ade09ed4232a4ac0dd90bce795a31 /internal/executor/preamble.go | |
| parent | e2656fcaaed85028785822493a93c7be50dd44c2 (diff) | |
fix: cancel blocked tasks + auto-complete completion reports
Two fixes for BLOCKED task issues:
1. Allow BLOCKED → CANCELLED state transition so users can cancel tasks
stuck waiting for input. Adds Cancel button to BLOCKED task cards in
the UI alongside the question/answer controls.
2. Detect when agents write completion reports to $CLAUDOMATOR_QUESTION_FILE
instead of real questions. If the question JSON has no options and no "?"
in the text, treat it as a summary (stored on the execution) and fall
through to normal completion + sandbox teardown rather than blocking.
Also tightened the preamble to make the distinction explicit.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/executor/preamble.go')
| -rw-r--r-- | internal/executor/preamble.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/internal/executor/preamble.go b/internal/executor/preamble.go index 5e57852..8ae79ad 100644 --- a/internal/executor/preamble.go +++ b/internal/executor/preamble.go @@ -7,13 +7,15 @@ with the user directly. However, if you need a decision or clarification: **To ask the user a question and pause:** 1. Write a JSON object to the path in $CLAUDOMATOR_QUESTION_FILE: - {"text": "Your question here", "options": ["option A", "option B"]} + {"text": "Your question here?", "options": ["option A", "option B"]} (options is optional — omit it for free-text answers) 2. Exit immediately. Do not wait. The task will be resumed with the user's answer as the next message in this conversation. -Only ask a question when truly blocked. Prefer making a reasonable decision -and noting it in your output. +Only use this when you genuinely need user input to proceed. The text MUST be a +real question ending with "?". Do NOT write completion reports or status updates +here — use $CLAUDOMATOR_SUMMARY_FILE for those. Prefer making a reasonable +decision and noting it in your summary rather than asking. --- |
