Repository navigation
fix(agent-api): surface "## Open" bullet questions in the Asks panel - #46
Conversation
The /tasks/active question parser only recognised a `## ` section as a question if its body contained `**Status:**` or `**Options:**` metadata. The proactive loop writes pending questions as plain bullet items under a single `## Open` header (per CLAUDE.md and the proactive-loop skill), so every loop-written question was silently skipped and the web UI Asks panel stayed empty. Parse each top-level bullet under `## Open` as its own question; skip bullets already annotated FIXED/RESOLVED/ANSWERED, and never surface the `## Resolved` section. Standalone `## <question>` + `**Status:**` sections are unaffected. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
bassilkhilo-ag2
left a comment
There was a problem hiding this comment.
Clean. The proactive loop writes questions to pending-questions.md under ## Open as bullet items, but do_GET in agent-api.py was only surfacing questions with **Status:** or **Options:** metadata — so loop-written questions never appeared in the web UI Asks panel.
The FIXED|RESOLVED|ANSWERED bullet filter is a good inclusion — prevents resolved items from re-appearing on each parse. The \*\*title\*\* extraction with fallback to first 80 chars handles both structured and freeform bullets.
Minor: the composite ID (f"Q{i}-{j}") assumes the i (section index) is stable across reads. If sections are added/removed in pending-questions.md, question IDs would shift, potentially breaking any cross-reference that stores them externally. If IDs need stability, a hash of the question text would be more robust — not urgent since the panel is mostly read-only display.
rickchen007
left a comment
There was a problem hiding this comment.
Approved (admin) — surfaces ## Open bullet questions in the Asks panel; backward-compatible with Status: sections. Clean.
Problem
The web UI Asks panel is empty even when
pending-questions.mdhas open questions.The
/tasks/activequestion parser inagent-api.pysplits the file on##headers and only treats a section as a question if its body contains**Status:**or**Options:**metadata. But the proactive loop writes pending questions as plain bullet items under a single## Openheader (perCLAUDE.mdand theproactive-loopskill) — no per-question metadata. So every loop-written question is silently skipped and the panel stays empty.(Note: this is a separate issue from the workspace-path bug fixed in #44 — that fixed which file is read; this fixes how it's parsed.)
Fix
Parse each top-level bullet under
## Openas its own question:FIXED/RESOLVED/ANSWEREDare skipped;## Resolvedsection is never surfaced;## <question>+**Status:**/**Options:**sections are unaffected (backward compatible).Bullet title = the leading
**bold**span (falls back to first 80 chars). IDs areQ{section}-{bullet}.Verification
Ran the new logic against the live
pending-questions.md: 0 → 5 questions parsed (4## Openbullets + 1 standalone metadata section; theFIXED-annotated bullet correctly skipped).python3 -m py_compile src/agent-api.pypasses.Known limitation / follow-up
The
POST /answerwrite-back flips a**Status:**line toanswered— bullet-format questions have no such line, so answering them from the panel won't persist a status change yet. Out of scope here (the goal is visibility); a follow-up can extend write-back to bullets, or extract the parser into a unit-testable function.🤖 Generated with Claude Code