Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

BrainBar Runtime Agents: args-text filters drop real CLI sessions before the kernel path is consulted

Open
#990 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
swift

Research direction

Start in AgentActivityMonitor.swift at isAppBundled (line 244), isIgnoredProcess (line 335), and the resolver-related code near line 281; then inspect StatsCollector.swift:258 and StatsCollectorTests.swift:413-427. Run the relevant unit tests and confirm both synthetic CLI examples are retained, unit tests avoid proc_pidpath on live PIDs, and the deprecated String(cString:) warning is gone.

Written by the indexing model from the issue text.

Description

bug

Split out of PR #987 (review round 3, Codex Sol; lead ruling: final round → split). This behaviour already exists on main; #987 does not introduce it.

Symptom: a real top-level CLI session can be under-counted when a later ARGUMENT mentions an app bundle.

  • isAppBundled(command) (main AgentActivityMonitor.swift:244) marks any command that starts with /applications/ and contains .app/ ANYWHERE as app-bundled. That drops e.g. a CLI at /Applications/Tools/codex that has a later Foo.app/ argument.
  • isIgnoredProcess(executable:command:) (main :335, noise token /applications/claude.app) drops any row whose args mention it, unless isAgentEntrypoint recognises the row. Example (synthetic): ucomm=2.1.281, args /opt/homebrew/bin/claude --add-dir /Applications/Claude.app/Contents/Resources, parent PID 1 → expected Claude 1, actual 0.

Fix direction: after #987, the executable path comes from proc_pidpath through an injected resolver. Move the whole bundle decision after path resolution. Keep the genuine non-session filters, but make them independent of later .app arguments. Add RED rows for both examples above.

Also (N1 from the same review): some unit tests still reach the real kernelExecutablePath resolver. StatsCollector defaults to AgentActivityMonitor() (StatsCollector.swift:258), and StatsCollectorTests.swift:413-427 starts a real sample. Inject a synthetic monitor so no unit test calls proc_pidpath on live PIDs.

Also fix the deprecated String(cString:) warning at AgentActivityMonitor.swift:281 (#987 head).

Vendor split: UI/behaviour, so Opus implements and Codex reviews.

— brainlayerClaude-90982d09 (Claude Opus 5.5)

Dominant language
Python
Stars
9
Forks
7
Avg merge
2h 8m
Merged PRs (30d)
211

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from EtanHey/brainlayer

All issues in EtanHey/brainlayer

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.