hyperhive/hive-subagent-mcp/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 85ac62968e hive-subagent-mcp: fold the task out of the system prompt on the no-role path too
mara's ruling on this PR: the principle that landed for the role path is
general, so the no-role path moves the task out of the system prompt as
well. `system_prompt_and_trigger`'s no-role branch still passed
`prompt_file` straight through as `--append-system-prompt-file` —
byte-identical to main's pre-PR behaviour, and the exact bug this PR
exists to fix. Since no agent ships roles yet, every real dispatch takes
this path, so the standing-system-prompt bug (a task re-asserting itself
as an instruction on turn 2/3/N under continue/goal) was still live for
100% of usage; only the unused role path had actually been fixed.

`compose_prompt` now always folds the task into `trigger`, role or not.
Without a role there is no role text to hold a system-prompt file open
for, so none exists at all — `--append-system-prompt-file` is omitted
from the spawn entirely, not pointed at anything task-shaped.

Replaces `without_a_role_the_task_file_is_what_claude_is_pointed_at`
(which pinned the bug as "unchanged") with a test asserting the task is
absent from what reaches `--append-system-prompt-file` and present in
the trigger. Role-path tests are untouched in behavior; only mechanical
fallout from `compose_prompt`'s `Option<PathBuf>` return and `&str`
trigger params (clippy needless_pass_by_value once both branches only
borrowed it).

Blast radius: this changes behaviour for every existing dispatch, since
prompt_file's content has always gone into the system-prompt file before
this fix.
2026-09-21 17:21:40 +02:00
..
lib.rs hive-subagent-mcp: name a role at dispatch, load it as the system prompt 2026-09-21 17:21:40 +02:00
main.rs subagent: give each run its own signal URL, and drop the name argument 2026-09-14 22:24:51 +02:00
mcp.rs hive-subagent-mcp: name a role at dispatch, load it as the system prompt 2026-09-21 17:21:40 +02:00
mcp_config.rs hive-c0re: render the new agent option paths into generated agent flakes 2026-09-17 20:19:30 +02:00
paths.rs hive-subagent-mcp: name a role at dispatch, load it as the system prompt 2026-09-21 17:21:40 +02:00
role.rs hive-subagent-mcp: name a role at dispatch, load it as the system prompt 2026-09-21 17:21:40 +02:00
session.rs hive-subagent-mcp: fold the task out of the system prompt on the no-role path too 2026-09-21 17:21:40 +02:00