Skip to content

Commit 44b9126

Browse files
Shahinyanmclaude
andcommitted
fix(tui): hide classifier sessions from session list (v0.2.11)
Every TJ_IN_CLASSIFIER-spawned `claude -p` creates its own session JSONL in ~/.claude/projects/<hash>/, so the TUI session list grows by one entry per ingested event. With auto-capture on, that turns into hundreds of 1-message ghost sessions and real work gets buried. Skip sessions whose first user message starts with the canned classifier prompt prefix ("You classify chat chunks for an AI-coding- agent task journal"). Backfill already drops them via its msg-count threshold; the TUI didn't. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 2de0959 commit 44b9126

9 files changed

Lines changed: 39 additions & 11 deletions

File tree

.claude-plugin/marketplace.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
},
77
"metadata": {
88
"description": "Task Journal — append-only reasoning chain memory for AI-coding tasks",
9-
"version": "0.2.10"
9+
"version": "0.2.11"
1010
},
1111
"plugins": [
1212
{
1313
"name": "task-journal",
1414
"source": "./plugin",
1515
"description": "Append-only journal of AI-coding task reasoning chains. Captures hypotheses, decisions, rejections, evidence — renders compact resume packs so an agent can pick up a 2-week-old task with full context.",
16-
"version": "0.2.10",
16+
"version": "0.2.11",
1717
"author": {
1818
"name": "Digital-Threads"
1919
},

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.2.11] - 2026-05-08
11+
12+
### Fixed
13+
- TUI session list (`task-journal ui`) now hides classifier sessions.
14+
Each `claude -p` invocation we make for classification creates its
15+
own JSONL in `~/.claude/projects/`; without filtering, the TUI was
16+
buried under hundreds of one-message ghost sessions all starting
17+
with "You classify chat chunks for an AI-coding-agent task journal."
18+
We now skip any session whose first user message begins with that
19+
marker so only real conversations show up.
20+
1021
## [0.2.10] - 2026-05-07
1122

1223
### Fixed

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ members = [
77
]
88

99
[workspace.package]
10-
version = "0.2.10"
10+
version = "0.2.11"
1111
edition = "2021"
1212
rust-version = "1.88"
1313
license = "MIT"

crates/tj-cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ name = "task-journal"
1616
path = "src/main.rs"
1717

1818
[dependencies]
19-
tj-core = { package = "task-journal-core", version = "0.2.10", path = "../tj-core" }
19+
tj-core = { package = "task-journal-core", version = "0.2.11", path = "../tj-core" }
2020
anyhow = { workspace = true }
2121
clap = { workspace = true }
2222
tracing = { workspace = true }

crates/tj-cli/src/tui/app.rs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,27 @@ impl App {
3535
};
3636

3737
// Parse session metadata (lightweight — just first user msg + timestamps).
38+
// Filter out classifier sessions: every TJ_IN_CLASSIFIER-spawned `claude
39+
// -p` invocation creates its own JSONL in ~/.claude/projects/, and they
40+
// all start with the same canned prompt. Without this filter the TUI is
41+
// drowned in 1-message ghost sessions and real work becomes hard to
42+
// find. The marker string is defined inside the classifier prompt — we
43+
// match a stable prefix.
44+
const CLASSIFIER_PROMPT_PREFIX: &str =
45+
"You classify chat chunks for an AI-coding-agent task journal";
3846
let mut items = Vec::new();
3947
for path in &sessions {
4048
match parser::parse_session(path) {
41-
Ok(parsed) => items.push(parsed),
49+
Ok(parsed) => {
50+
if parsed
51+
.first_user_text()
52+
.map(|t| t.trim_start().starts_with(CLASSIFIER_PROMPT_PREFIX))
53+
.unwrap_or(false)
54+
{
55+
continue;
56+
}
57+
items.push(parsed);
58+
}
4259
Err(_) => continue,
4360
}
4461
}

crates/tj-mcp/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ name = "task-journal-mcp"
1616
path = "src/main.rs"
1717

1818
[dependencies]
19-
tj-core = { package = "task-journal-core", version = "0.2.10", path = "../tj-core" }
19+
tj-core = { package = "task-journal-core", version = "0.2.11", path = "../tj-core" }
2020
anyhow = { workspace = true }
2121
tokio = { workspace = true }
2222
tracing = { workspace = true }

plugin/.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "task-journal",
3-
"version": "0.2.10",
3+
"version": "0.2.11",
44
"description": "Append-only journal of AI-coding task reasoning chains: hypotheses, decisions, rejections, evidence. Renders compact resume packs so an agent can pick up a 2-week-old task with full context.",
55
"author": {
66
"name": "Mher Shahinyan"

plugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "task-journal",
3-
"version": "0.2.10",
3+
"version": "0.2.11",
44
"description": "Append-only journal of AI-coding task reasoning chains. Captures hypotheses, decisions, rejections, evidence — renders compact resume packs so an agent can pick up a 2-week-old task with full context.",
55
"author": {
66
"name": "Mher Shahinyan",

0 commit comments

Comments
 (0)