π€ This issue was researched and written by Claude Code (Anthropic's CLI agent), while debugging a downstream copy of this workflow.
Summary
The discussion-task-miner workflow's repo-memory never persists across runs. Its dedup state (processed-discussions.json / extracted-tasks.json) is written to a subdirectory of the repo-memory root, but the file-glob configured by shared/repo-memory-standard.md only matches files at the root. push_repo_memory silently skips the nested files, so every run starts from empty history, re-mines the same recent discussions, and opens duplicate issues.
Runs still report success β the only visible symptom is that the memory/discussion-task-miner branch quietly stops advancing.
Affected files (on main)
.github/workflows/discussion-task-miner.md β Step 1 (Load Memory) and Step 6 (Update Memory) read/write nested paths:
memory/discussion-task-miner/processed-discussions.json
memory/discussion-task-miner/extracted-tasks.json
memory/discussion-task-miner/latest-run.md
.github/workflows/shared/repo-memory-standard.md β configures a root-anchored glob:
tools:
repo-memory:
file-glob: ["*.json", "*.jsonl", "*.csv", "*.md"]
Mechanism
push_repo_memory matches each candidate file's path relative to the repo-memory directory against the glob, and *.json compiles to a root-anchored regex ^[^/]*\.json$ β [^/]* cannot cross a /. The memory files the prompt writes land in a subdirectory of the repo-memory root (the agent resolves the relative memory/discussion-task-miner/β¦ under β¦/repo-memory/<id>/), so they never match. The job log shows:
##[warning]Skipping file that does not match allowed patterns: discussion-task-miner/extracted-tasks.json
...
No changes detected after copying files
β nothing is committed. Only files written flat at the repo-memory root are eligible for persistence.
Secondary issue: the prompt uses cat > memory/discussion-task-miner/<file>, which requires the subdirectory to already exist. mkdir is commonly outside the workflow's bash allowlist (I saw mkdir β¦ was blocked), so these bash writes fail unless the agent happens to fall back to a file-write tool that creates parent dirs. Combined with the glob mismatch, persistence is doubly unreliable.
Impact
- Silent. Runs succeed; the memory branch just stops advancing (in the case I debugged, it was frozen ~10 days while daily runs kept "succeeding").
- Dedup depends entirely on that memory, so the miner re-processes the same last-N-days discussions each run and files duplicate issues β I observed the identical dependency-upgrade task issued twice, days after a PR had already merged the change.
Reproduce
- Run
discussion-task-miner (or any workflow importing shared/repo-memory-standard.md whose prompt writes memory under a memory/<name>/β¦ subdirectory).
- Inspect the
push_repo_memory job log β Skipping file that does not match allowed patterns: <name>/β¦ followed by No changes detected.
- Observe the
memory/<branch> branch does not advance even though the agent reported updating memory.
Suggested fix
Preferred β write memory flat at the repo-memory root. In Step 1/6, replace memory/discussion-task-miner/<file> with the repo-memory root (/tmp/gh-aw/repo-memory/<id>/<file>; default for a single memory), and add an explicit note that memory files must be stored flat at the root (no subdirectories, no mkdir) because only top-level files match the persist glob. This mirrors the fix already applied to copilot-pr-prompt-analysis in #40547, which moved history to repo-memory/default/ flat.
Alternative β keep the nested layout but make the glob match it, e.g. file-glob: ["discussion-task-miner/*.json", "discussion-task-miner/*.md"] (as some namespaced-memory workflows already do), and ensure the subdirectory is creatable. This is more fragile: it re-breaks silently if the glob and the paths ever drift, and it still needs the mkdir/parent-dir path to work.
Note
This likely affects any template that pairs shared/repo-memory-standard.md (root-anchored glob) with nested memory/<name>/β¦ paths in the prompt body β worth a grep across the workflow set. Related prior instance of the same repo-memory-path class of bug: #40547.
Happy to send a PR for the flat-path fix if it'd help.
π€ This issue was researched and written by Claude Code (Anthropic's CLI agent), while debugging a downstream copy of this workflow.
Summary
The
discussion-task-minerworkflow's repo-memory never persists across runs. Its dedup state (processed-discussions.json/extracted-tasks.json) is written to a subdirectory of the repo-memory root, but thefile-globconfigured byshared/repo-memory-standard.mdonly matches files at the root.push_repo_memorysilently skips the nested files, so every run starts from empty history, re-mines the same recent discussions, and opens duplicate issues.Runs still report success β the only visible symptom is that the
memory/discussion-task-minerbranch quietly stops advancing.Affected files (on
main).github/workflows/discussion-task-miner.mdβ Step 1 (Load Memory) and Step 6 (Update Memory) read/write nested paths:.github/workflows/shared/repo-memory-standard.mdβ configures a root-anchored glob:Mechanism
push_repo_memorymatches each candidate file's path relative to the repo-memory directory against the glob, and*.jsoncompiles to a root-anchored regex^[^/]*\.json$β[^/]*cannot cross a/. The memory files the prompt writes land in a subdirectory of the repo-memory root (the agent resolves the relativememory/discussion-task-miner/β¦underβ¦/repo-memory/<id>/), so they never match. The job log shows:β nothing is committed. Only files written flat at the repo-memory root are eligible for persistence.
Secondary issue: the prompt uses
cat > memory/discussion-task-miner/<file>, which requires the subdirectory to already exist.mkdiris commonly outside the workflow'sbashallowlist (I sawmkdir β¦ was blocked), so these bash writes fail unless the agent happens to fall back to a file-write tool that creates parent dirs. Combined with the glob mismatch, persistence is doubly unreliable.Impact
Reproduce
discussion-task-miner(or any workflow importingshared/repo-memory-standard.mdwhose prompt writes memory under amemory/<name>/β¦subdirectory).push_repo_memoryjob log βSkipping file that does not match allowed patterns: <name>/β¦followed byNo changes detected.memory/<branch>branch does not advance even though the agent reported updating memory.Suggested fix
Preferred β write memory flat at the repo-memory root. In Step 1/6, replace
memory/discussion-task-miner/<file>with the repo-memory root (/tmp/gh-aw/repo-memory/<id>/<file>;defaultfor a single memory), and add an explicit note that memory files must be stored flat at the root (no subdirectories, nomkdir) because only top-level files match the persist glob. This mirrors the fix already applied tocopilot-pr-prompt-analysisin #40547, which moved history torepo-memory/default/flat.Alternative β keep the nested layout but make the glob match it, e.g.
file-glob: ["discussion-task-miner/*.json", "discussion-task-miner/*.md"](as some namespaced-memory workflows already do), and ensure the subdirectory is creatable. This is more fragile: it re-breaks silently if the glob and the paths ever drift, and it still needs themkdir/parent-dir path to work.Note
This likely affects any template that pairs
shared/repo-memory-standard.md(root-anchored glob) with nestedmemory/<name>/β¦paths in the prompt body β worth a grep across the workflow set. Related prior instance of the same repo-memory-path class of bug: #40547.Happy to send a PR for the flat-path fix if it'd help.