diff options
| author | soryu <soryu@soryu.co> | 2026-02-14 21:29:26 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-14 21:29:26 +0000 |
| commit | 9aadbc7958d39d181c0dd0600e2b7c30bb6c391a (patch) | |
| tree | ef8bed9718c39041191b58a284ee31f5d8d32521 /makima/src/server/handlers/mesh.rs | |
| parent | c1e55ce4fec79f9909b957f86bd7fa8b76939746 (diff) | |
| download | soryu-9aadbc7958d39d181c0dd0600e2b7c30bb6c391a.tar.gz soryu-9aadbc7958d39d181c0dd0600e2b7c30bb6c391a.zip | |
Makima system improvements: Orders, directive questions, PR creation fix, bug fixes (#62)
* feat: soryu-co/soryu - makima: Fix directive goal update bug - stale closure issue
* WIP: heartbeat checkpoint
* WIP: heartbeat checkpoint
* feat: soryu-co/soryu - makima: Create Orders database schema and backend API
* feat: soryu-co/soryu - makima: Fix task Claude instance not receiving user inputs from input box
* WIP: heartbeat checkpoint
* feat: soryu-co/soryu - makima: Build Orders frontend page replacing the Board page
* WIP: heartbeat checkpoint
* WIP: heartbeat checkpoint
* feat: soryu-co/soryu - makima: Fix directive PR creation system
Diffstat (limited to 'makima/src/server/handlers/mesh.rs')
| -rw-r--r-- | makima/src/server/handlers/mesh.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/makima/src/server/handlers/mesh.rs b/makima/src/server/handlers/mesh.rs index eb87e17..c840676 100644 --- a/makima/src/server/handlers/mesh.rs +++ b/makima/src/server/handlers/mesh.rs @@ -1070,17 +1070,19 @@ pub async fn send_message( } }; - // Check if task is running (except for AUTH_CODE messages and supervisor tasks) - // Supervisor tasks can receive messages even when not running - daemon will respawn Claude + // Check if task is in a state that can receive messages + // Allow "running" and "starting" (to handle race between status update and message send) + // Also allow AUTH_CODE messages and supervisor tasks regardless of status let is_auth_code = req.message.starts_with("AUTH_CODE:"); let is_supervisor = task.is_supervisor; - if task.status != "running" && !is_auth_code && !is_supervisor { + let can_receive_message = task.status == "running" || task.status == "starting"; + if !can_receive_message && !is_auth_code && !is_supervisor { return ( StatusCode::BAD_REQUEST, Json(ApiError::new( "INVALID_STATE", format!( - "Cannot send message to task in status: {}. Task must be running.", + "Cannot send message to task in status: {}. Task must be running or starting.", task.status ), )), |
