Skip to content

armgit / agtx

Public Imported from GitHub
0

πŸ„πŸΌβ€β™‚οΈ The blackboard for coding agents - agentic development environment for claude code, codex, cursor, opencode, grok and more.

feat: clear stale context when advancing task phase (#45)

qianchongyangef6152f7ec59
diff --git a/src/tui/app.rs b/src/tui/app.rs
index 2819dfe..4a1b46f 100644
--- a/src/tui/app.rs
+++ b/src/tui/app.rs
@@ -3585,9 +3585,18 @@ impl App {
if !handled {
task.status = new_status;
task.updated_at = chrono::Utc::now();
+
+ // Clear context from previous phase on transition
+ task.escalation_note = None;
+
if let Some(db) = &self.state.db {
db.update_task(&task)?;
}
+
+ // Clear stale phase context
+ self.state.stuck_task_notified.remove(&task.id);
+ self.state.stuck_task_idle_since.remove(&task.id);
+ self.state.phase_status_cache.remove(&task.id);
}
}