Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.
| g1t coordinates the work and the person's own sessions do it: Ask g1t reads g1t with the same tools any agent gets, answers in one conversation shared with the @g1t direct message in Chat, and hands work to sessions in the person's own harness, whose subagents g1t records, ties to issues and pull requests, and lets see each other. | 1 | -- Subagents, what sessions touched, and the issues and pull requests they |
| 2 | -- worked on (src/coordination/sessions.rs, links.rs). | |
| 3 | ||
| 4 | -- A subagent is a session of its own whose parent_id names the session | |
| 5 | -- that started it (a Claude Code subagent, a Managed Agents thread). It | |
| 6 | -- carries its kind, the task and prompt its parent gave it (cut short), | |
| 7 | -- and its result: its final message, which is its parent's evidence. | |
| 8 | ALTER TABLE sessions ADD COLUMN parent_id TEXT; | |
| 9 | ALTER TABLE sessions ADD COLUMN agent_type TEXT; | |
| 10 | ALTER TABLE sessions ADD COLUMN task TEXT; | |
| 11 | ALTER TABLE sessions ADD COLUMN prompt TEXT; | |
| 12 | ALTER TABLE sessions ADD COLUMN result TEXT; | |
| 13 | ALTER TABLE sessions ADD COLUMN model TEXT; | |
| 14 | -- When its recording was last announced as session.progressed, so that it | |
| 15 | -- is announced at most every few seconds. | |
| 16 | ALTER TABLE sessions ADD COLUMN progressed_at TEXT; | |
| 17 | CREATE INDEX sessions_by_parent ON sessions (parent_id) WHERE parent_id IS NOT NULL; | |
| 18 | ||
| 19 | -- What a session says it touched: files it wrote, commits it made, branches | |
| 20 | -- it pushed, pull requests it opened, issues it named. Once per session, | |
| 21 | -- kind and value; the first time it said so. | |
| 22 | CREATE TABLE session_touches ( | |
| 23 | session_id TEXT NOT NULL, | |
| 24 | repo_id TEXT NOT NULL, | |
| 25 | -- file, commit, branch, pull or issue. | |
| 26 | kind TEXT NOT NULL, | |
| 27 | value TEXT NOT NULL, | |
| 28 | at TEXT NOT NULL, | |
| 29 | PRIMARY KEY (session_id, kind, value) | |
| 30 | ); | |
| 31 | CREATE INDEX session_touches_by_value ON session_touches (repo_id, kind, value); | |
| 32 | ||
| 33 | -- How a session is tied to an issue or pull request, one row per way: | |
| 34 | -- attached, claim, branch, commit, trailer, opened or ref. The issue and | |
| 35 | -- pull request pages list the sessions tied to them from here. | |
| 36 | CREATE TABLE session_links ( | |
| 37 | session_id TEXT NOT NULL, | |
| 38 | repo_id TEXT NOT NULL, | |
| 39 | -- issue or pull. | |
| 40 | kind TEXT NOT NULL, | |
| 41 | number INTEGER NOT NULL, | |
| 42 | via TEXT NOT NULL, | |
| 43 | at TEXT NOT NULL, | |
| 44 | PRIMARY KEY (session_id, kind, number, via) | |
| 45 | ); | |
| 46 | CREATE INDEX session_links_by_number ON session_links (repo_id, kind, number); | |
| 47 | ||
| 48 | -- Pairs of sessions announced as changing the same files | |
| 49 | -- (overlap.detected), lower id first: announced once. | |
| 50 | CREATE TABLE session_overlaps ( | |
| 51 | repo_id TEXT NOT NULL, | |
| 52 | low TEXT NOT NULL, | |
| 53 | high TEXT NOT NULL, | |
| 54 | -- JSON array of the paths both touched when it was announced. | |
| 55 | files TEXT NOT NULL, | |
| 56 | noticed_at TEXT NOT NULL, | |
| 57 | PRIMARY KEY (repo_id, low, high) | |
| 58 | ); |