From 9aadbc7958d39d181c0dd0600e2b7c30bb6c391a Mon Sep 17 00:00:00 2001 From: soryu Date: Sat, 14 Feb 2026 21:29:26 +0000 Subject: 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 --- makima/src/daemon/skills/directive.md | 6 ++++++ makima/src/daemon/task/manager.rs | 23 +++++++++++++++-------- 2 files changed, 21 insertions(+), 8 deletions(-) (limited to 'makima/src/daemon') diff --git a/makima/src/daemon/skills/directive.md b/makima/src/daemon/skills/directive.md index 68d9277..9d2b644 100644 --- a/makima/src/daemon/skills/directive.md +++ b/makima/src/daemon/skills/directive.md @@ -76,6 +76,12 @@ Updates the goal and bumps `goalUpdatedAt`. If the directive is `idle`, it react makima directive pause ``` +### Update Directive Metadata +```bash +makima directive update --pr-url "" --pr-branch "" +``` +Updates the directive's PR URL and/or PR branch. Used by completion tasks to store the PR URL after creating it. + ## Memory Commands Directives have an optional key-value memory system that persists across steps and planning cycles. Use memory to share context, decisions, and learned information between steps — so downstream tasks don't need to re-discover what earlier steps already figured out. diff --git a/makima/src/daemon/task/manager.rs b/makima/src/daemon/task/manager.rs index ce5a580..76138c1 100644 --- a/makima/src/daemon/task/manager.rs +++ b/makima/src/daemon/task/manager.rs @@ -1611,14 +1611,14 @@ impl TaskManager { } // Regular message - send to task's stdin - tracing::info!(task_id = %task_id, message_len = message.len(), "Sending message to task"); + tracing::info!(task_id = %task_id, message_len = message.len(), "Sending message to task stdin"); // Send message to the task's stdin via the input channel let inputs = self.task_inputs.read().await; if let Some(sender) = inputs.get(&task_id) { if let Err(e) = sender.send(message).await { - tracing::warn!(task_id = %task_id, error = %e, "Failed to send message to task input channel"); + tracing::warn!(task_id = %task_id, error = %e, "Failed to send message to task input channel (channel may be closed, stdin forwarder may have exited)"); } else { - tracing::info!(task_id = %task_id, "Message sent to task successfully"); + tracing::info!(task_id = %task_id, "Message sent to task input channel successfully, will be forwarded to Claude stdin"); } } else { drop(inputs); // Release read lock before checking if we need to respawn @@ -5192,12 +5192,19 @@ impl TaskManagerInner { // Check if this is a "result" message indicating task completion // With --input-format=stream-json, Claude waits for more input after completion - // We close stdin to signal EOF and let the process exit if line.json_type.as_deref() == Some("result") { - tracing::info!(task_id = %task_id, "Received result message, closing stdin to signal completion"); - let mut stdin_guard = stdin_handle_for_completion.lock().await; - if let Some(mut stdin) = stdin_guard.take() { - let _ = stdin.shutdown().await; + if autonomous_loop { + // In autonomous loop mode, close stdin to let the process exit + // so we can spawn the next iteration with --continue + tracing::info!(task_id = %task_id, "Received result message in autonomous loop, closing stdin to signal completion"); + let mut stdin_guard = stdin_handle_for_completion.lock().await; + if let Some(mut stdin) = stdin_guard.take() { + let _ = stdin.shutdown().await; + } + } else { + // In interactive mode, keep stdin open so the user can send + // follow-up messages. Claude will stay alive waiting for input. + tracing::info!(task_id = %task_id, "Received result message, keeping stdin open for interactive input"); } } -- cgit v1.2.3