feat(#2569): merge harness-local todos into get_loose_ends

This commit is contained in:
damocles 2026-07-20 22:53:55 +02:00
commit a2d44c7eb6
4 changed files with 34 additions and 2 deletions

View file

@ -35,8 +35,8 @@ pub use args::{
pub use render::{annotate_retries, format_ack, format_agent_meta, format_recv};
use render::{
format_matrix_summary, loose_end_kind_label, matrix_unread_summary, parse_loose_end_kind,
render_loose_ends, reply_err,
format_matrix_summary, local_todos, loose_end_kind_label, matrix_unread_summary,
parse_loose_end_kind, render_loose_ends, reply_err,
};
/// Write (or remove) the status file in the agent's own `state/` directory.
@ -333,6 +333,12 @@ impl AgentServer {
);
}
}
// Merge the harness's local todos (loose-ends v2) for self-queries.
// The harness owns the todo store in-container; another agent's
// todos aren't reachable from here (same as matrix above).
if is_self_query && let Some(todos) = local_todos().await {
loose_ends.extend(todos);
}
let mut out = annotate_retries(render_loose_ends(&loose_ends), retries);
// Append loose-end items published by external MCP daemons
// (e.g. active bash tasks from hive-bash-mcp). Generic — no