# What changed in 2g

> 27 changes in 2g 0.2 to 1 from its official release notes, upgrade guides and advisories: 5 breaking, 2 new APIs and options. Each one cited. Sources checked 2026-10-18. HTML: https://unstale.sh/npm/2g/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## 2g 1

### Breaking changes

- Rebases log.path onto the working directory instead of the log destination directory. (1.0.1) — [release notes](https://github.com/kitten/2g/releases/tag/v1.0.1)
- Typegen rejects invalid literal registered categories and names; valid identifiers are nonempty ASCII strings using letters, digits, _, -, ., or :. (1.0.0) — [release notes](https://github.com/kitten/2g/releases/tag/v1.0.0)
- The hardcoded session format moves to the top level of meta.json and is removed from application metadata types. (1.0.0) — [release notes](https://github.com/kitten/2g/releases/tag/v1.0.0)
- Installation options and session listings use metadata.version instead of top-level version; the default version and formatVersion are removed. (1.0.0) — [release notes](https://github.com/kitten/2g/releases/tag/v1.0.0)

### New APIs and options

- Adds typed session metadata updates that merge changes, emit root:update, and expose current metadata through ps and list(). (1.0.0) — [release notes](https://github.com/kitten/2g/releases/tag/v1.0.0)

### Fixes and other changes

- Application version metadata is preserved when filtering record exports. (1.0.0) — [release notes](https://github.com/kitten/2g/releases/tag/v1.0.0)
- Captured children and their descendants are routed to the capture pipe instead of inherited logger IPC, fixing empty captures inside instrumented processes. (1.0.0) — [release notes](https://github.com/kitten/2g/releases/tag/v1.0.0)
- Worker initialization events no longer overwrite root session metadata in Chrome Trace exports. (1.0.0) — [release notes](https://github.com/kitten/2g/releases/tag/v1.0.0)
- Explicit file and file-descriptor destinations now use the version supplied to installEventLogger when emitting root:init. (1.0.0) — [release notes](https://github.com/kitten/2g/releases/tag/v1.0.0)
- Pending flushes settle when their stream closes and report an error if shutdown discards buffered data instead of leaving callbacks unresolved. (1.0.0) — [release notes](https://github.com/kitten/2g/releases/tag/v1.0.0)
- Ending an empty log stream before its file opens now closes it and invokes the end callback. (1.0.0) — [release notes](https://github.com/kitten/2g/releases/tag/v1.0.0)
- Partial log writes no longer corrupt Unicode characters when a write splits a UTF-8 character, including under socket-draining backpressure. (1.0.0) — [release notes](https://github.com/kitten/2g/releases/tag/v1.0.0)
- Span start times are included when calculating the session span so it encloses its children. (1.0.0) — [release notes](https://github.com/kitten/2g/releases/tag/v1.0.0)
- Reports failure when the recorded command exits nonzero or is terminated by a signal, while still writing its trace. (1.0.0) — [release notes](https://github.com/kitten/2g/releases/tag/v1.0.0)
- Buffered live events stop being delivered after cancellation, and early iteration stops clean up sockets, timers, and abort listeners; already-aborted signals are honored with timeouts. (1.0.0) — [release notes](https://github.com/kitten/2g/releases/tag/v1.0.0)
- Generated declarations now quote and escape payload property names containing punctuation, quotes, backslashes, or newlines. (1.0.0) — [release notes](https://github.com/kitten/2g/releases/tag/v1.0.0)
- Ordinary child-process events now include worker IDs when the parent logs to an explicit file or file descriptor. (1.0.0) — [release notes](https://github.com/kitten/2g/releases/tag/v1.0.0)

## 2g 0.4

### New APIs and options

- Adds a sub-command to export traces for full command runs. (0.4.0) — [release notes](https://github.com/kitten/2g/releases/tag/v0.4.0)

### Fixes and other changes

- The help output now mentions LOG_EVENTS for raw debug output. (0.4.4) — [release notes](https://github.com/kitten/2g/releases/tag/v0.4.4)
- Fixes IPC activation for explicit log targets such as record in child processes and worker threads. (0.4.3) — [release notes](https://github.com/kitten/2g/releases/tag/v0.4.3)
- Fixes draining on SIGINT and SIGTERM when running 2g record. (0.4.1) — [release notes](https://github.com/kitten/2g/releases/tag/v0.4.1)
- Help output is adjusted to prevent agents from running into cut-off trace outputs or logs. (0.4.0) — [release notes](https://github.com/kitten/2g/releases/tag/v0.4.0)
- Limits are adjusted to prevent agents from running into cut-off trace outputs or logs. (0.4.0) — [release notes](https://github.com/kitten/2g/releases/tag/v0.4.0)

## 2g 0.3

### Breaking changes

- The initial log.span call no longer accepts arguments, preventing merging and split event construction. (0.3.0) — [release notes](https://github.com/kitten/2g/releases/tag/v0.3.0)

### Fixes and other changes

- Child `_w` IDs are now present on piped events, and auto-install works in child workers. (0.3.1) — [release notes](https://github.com/kitten/2g/releases/tag/v0.3.1)

## 2g 0.2

### Behavior and default changes

- Event filters are more intuitive: a raw event name scopes to any sub-filter instead of matching only exactly. (0.2.0) — [release notes](https://github.com/kitten/2g/releases/tag/v0.2.0)
- The help output was adjusted for agent usage. (0.2.0) — [release notes](https://github.com/kitten/2g/releases/tag/v0.2.0)
