Bug
The "⚡ live" badge on comment threads appears whenever any reply has author === agentName, but it should only appear when the user explicitly used the "Send to Agent" button.
Reproduction
- Configure
agent_cmd in crit config
- Use the plan hook flow — Claude replies to a comment via
crit comment --reply-to <id> --author claude "..."
- The comment thread shows the "⚡ live" badge even though "Send to Agent" was never used
Root cause
isLiveThread() in app.js (line ~4285) uses a broad heuristic:
function isLiveThread(comment) {
if (!agentEnabled || !comment.replies) return false;
return comment.replies.some(function(r) { return r.author === agentName; });
}
This matches ANY reply from the agent, including CLI replies from plan review (crit comment --reply-to --author claude). It should only match threads where "Send to Agent" was explicitly used.
Impact
- Threads incorrectly show as "live"
- Replies in "live" threads auto-forward to the agent (line ~5127), so typing a reply in a falsely-live thread would unexpectedly trigger an agent request
Suggested fix
Persist an agent_requested flag on the comment when POST /api/agent/request is called. Then isLiveThread checks comment.agent_requested instead of checking reply authors.
Bug
The "⚡ live" badge on comment threads appears whenever any reply has
author === agentName, but it should only appear when the user explicitly used the "Send to Agent" button.Reproduction
agent_cmdin crit configcrit comment --reply-to <id> --author claude "..."Root cause
isLiveThread()inapp.js(line ~4285) uses a broad heuristic:This matches ANY reply from the agent, including CLI replies from plan review (
crit comment --reply-to --author claude). It should only match threads where "Send to Agent" was explicitly used.Impact
Suggested fix
Persist an
agent_requestedflag on the comment whenPOST /api/agent/requestis called. ThenisLiveThreadcheckscomment.agent_requestedinstead of checking reply authors.