garrytan / garrytan/gstack

/office-hours always reports SESSION_COUNT: 0, welcome_back tier is unreachable

Open
#1,677 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
133k
Forks
19.9k
Avg merge
18h 46m
Merged PRs (30d)
26

Description

# `/office-hours` always reports `SESSION_COUNT: 0`, welcome_back tier is unreachable

Every `/office-hours` run on a fresh `$HOME` returns `TIER: introduction` and fires the full closing pitch. Doesn't matter how many times the user has run it. The `welcome_back` tier in `bin/gstack-developer-profile:165-169` (which exists specifically to skip the closing pitch for returning users) is never reached on fresh-`$HOME` installs.

The v1.0.0.0 migration moved the read path to `~/.gstack/developer-profile.json`, but the writer in `office-hours/SKILL.md` (lines 1560 and 2022 as of 2026-05-24) still appends to `~/.gstack/builder-profile.jsonl`. On first read, `ensure_profile()` creates a stub `developer-profile.json` with `sessions: []`. Later writes go to a file the reader never re-reads. `SESSION_COUNT` stays 0 forever.

Live since `0a803f9` / PR #1039 / v1.0.0.0 (2026-04-18). 5 weeks on every fresh-`$HOME` user.

## Repro

Fresh `$HOME`, run `/office-hours` twice (or check `~/.gstack/` between runs):

```
05:26 ~/.gstack/developer-profile.json created (sessions: [], empty stub)
05:53 ~/.gstack/builder-profile.jsonl appended (today's session)
```

27-minute gap inside one skill run. Reader saw the empty stub at preamble; writer appended to the legacy file at completion. Second `/office-hours` run re-reads the stub, still sees `sessions: []`, still picks the introduction tier.

## Fix

Either (a) move the writer to `developer-profile.json`, or (b) move the reader back to `builder-profile.jsonl`. (a) is the direction v1.0.0.0 was going; (b) is a revert. Option (a) needs a small subcommand on `gstack-developer-profile` that read-modify-writes the `sessions[]` array. Whoever owns this should also decide on stranded entries in `builder-profile.jsonl` from the broken-writer period (leave them; loss is aesthetic).

Filing as a regression report, not a PR. Happy to send a PR if useful; flag here first since the choice of (a) vs (b) is yours.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.