Skip to content

Sessions and data

These commands inspect local state without a configured model.

Select a database

Data source Selection
CLI/server database Default or --db-path <path>
All local TUI databases gdc sessions list --all-projects
One local TUI database --db-path ~/.gdc/projects/<slug>/sessions.db

Use the same --db-path when listing and inspecting individual sessions.

Sessions

List

gdc sessions list
gdc sessions list --all
gdc sessions list --cwd /path/to/repo --limit 50
gdc sessions list --tree
gdc sessions list --root-only

Lists are project-scoped by default. --all widens scope within the selected database. --tree includes child sessions; --root-only hides them.

Show

gdc sessions show <id>
gdc sessions show <id> --limit 10
gdc sessions show <id> --json --with-audit

Delete

gdc sessions delete <id>
gdc sessions delete <id> --yes

Deletion removes dependent message and tool records. --yes skips confirmation.

Bulk cleanup

gdc storage gc 30 --dry-run
gdc storage gc 30
gdc storage gc 30 --yes

Deletes sessions older than 30 days in the selected database.

Remembered approvals

gdc permissions list
gdc permissions list --all --json
gdc permissions revoke bash jq
gdc permissions revoke --all

Revocation asks for confirmation unless --yes is set. Revoking an absent grant exits successfully with a notice. File-mirrored config rules must also be reviewed if the permission remains allowed.

Memory notes

gdc memory list --scope user
gdc memory search redis
gdc memory show staging
gdc memory write staging --description "Staging database" \
  --type project --scope project --content "The database is read-only."
gdc memory delete staging --scope project
Field Values
--scope user, project, local
--type user, feedback, project, reference
--content Body text; - reads stdin

Machine-readable output

show, permission inspection and memory inspection support --json. sessions list currently emits a text table or tree.

gdc sessions show <id> --json | jq '.messages | length'
gdc permissions list --json | jq .

See CLI reference and data locations.