# Changelog

All notable changes to this project will be documented in this file.

## [0.13.0] - 2026-08-12

### Added

- Codex pickups now support opening in the Codex desktop app. `niteshift pickup` registers each Codex session in the app's thread index (named after the Niteshift task), and the resume prompt gained an "Open in Codex app" option that prepares the local git branch and opens the thread via its `codex://threads/<id>` link ([#225](https://github.com/niteshiftdev/niteshift-cli/pull/225))

### Fixed

- The CLI now installs cleanly on Node 26 (`better-sqlite3` bumped to 12.11.1, since 12.6.x fails to build on Node 26) ([#225](https://github.com/niteshiftdev/niteshift-cli/pull/225))

## [0.12.0] - 2026-07-11

### Added

- `niteshift interrupt` stops a task's in-flight turn and clears any queued prompts ([#212](https://github.com/niteshiftdev/niteshift-cli/pull/212))
- `niteshift archive` and `niteshift unarchive` move tasks in and out of your archive. Both accept multiple task ids or URLs, or an interactive picker, and report per-task errors when only some of a batch succeed ([#212](https://github.com/niteshiftdev/niteshift-cli/pull/212))
- `niteshift prompt --steer` redirects the agent mid-turn instead of queueing your message for the next one ([#212](https://github.com/niteshiftdev/niteshift-cli/pull/212))

### Fixed

- `niteshift run` now respects the default model you set in the web UI. Previously it always sent the global catalog default (Opus 4.8), overriding your account default and its saved settings such as fast mode. Passing `--model` still pins an explicit model ([#216](https://github.com/niteshiftdev/niteshift-cli/pull/216))

### Security

- Updated dependencies to clear all known security advisories, including `@anthropic-ai/sdk` (insecure default file permissions in the local filesystem memory tool) and patched versions of `ws` and `glob` ([#218](https://github.com/niteshiftdev/niteshift-cli/pull/218))

## [0.11.0] - 2026-06-03

### Added

- `niteshift run` and `terminal new` now accept `--effort <low|medium|high|xhigh|max>` and `--fast` flags to tune agent effort ([#204](https://github.com/niteshiftdev/niteshift-cli/pull/204))
- Adds Opus 4.8 support, with `niteshift run` now drawing from a dynamic model catalog so available models always stay in sync with the server ([#204](https://github.com/niteshiftdev/niteshift-cli/pull/204))
- `niteshift list` and task pickers now show a per-task agent status indicator (working, needs attention, ready for review, or failed) sourced from the server, with a clear "Agent Status" column and color-coded glyphs ([#202](https://github.com/niteshiftdev/niteshift-cli/pull/202), [#206](https://github.com/niteshiftdev/niteshift-cli/pull/206))

### Fixed

- `niteshift pickup --token` now exchanges pickup credentials before reading a task and requires a concrete task id or URL, with a fallback to direct token use against older backends ([#201](https://github.com/niteshiftdev/niteshift-cli/pull/201))
- Piping CLI output into `head` (or quitting a pager early) no longer crashes with an `EPIPE` stack trace; the CLI now exits cleanly ([#206](https://github.com/niteshiftdev/niteshift-cli/pull/206))

## [0.10.2] - 2026-05-22

### Fixed

- `niteshift watch` now recovers from an expired authentication token by refreshing and reconnecting the stream, instead of silently exiting without output ([#194](https://github.com/niteshiftdev/niteshift-cli/pull/194))
- `niteshift watch` no longer drops a finalized message when it shares a stream ID with an earlier partial event ([#197](https://github.com/niteshiftdev/niteshift-cli/pull/197))
- SSE authentication refresh failures are now reported through the stream error handler without forwarding stale errors after the client has closed ([#198](https://github.com/niteshiftdev/niteshift-cli/pull/198))
- `niteshift pickup` no longer prints a red "Failed to register with cloud" stack trace on every run. The CLI was calling a server endpoint that was never deployed; the orphan call has been removed ([#186](https://github.com/niteshiftdev/niteshift-cli/pull/186))

## [0.10.1] - 2026-05-17

### Changed

- Updated the agent model catalog to match the current Niteshift offering, adding new primary models (`claude-opus-4-6[1m]`, `gpt-5.5-*`, `gpt-5.4-mini-*`) and removing models that are no longer surfaced as primary choices ([#187](https://github.com/niteshiftdev/niteshift-cli/pull/187))

## [0.10.0] - 2026-05-06

### Highlights

`niteshift list` now supports structured JSON output.

### Added

- New `--json` and `--format <table|json>` flags on `niteshift list` output structured task metadata — including status, timestamps, branch, model, and pull request details — for scripting and integration ([#183](https://github.com/niteshiftdev/niteshift-cli/pull/183))

### Fixed

- `niteshift watch --last <n> --no-follow` now exits successfully after rendering history, and `--last` reliably returns the requested number of events when internal events would otherwise be filtered out ([#183](https://github.com/niteshiftdev/niteshift-cli/pull/183))

### Changed

- Performance improvements ([#183](https://github.com/niteshiftdev/niteshift-cli/pull/183))

## [0.9.0] - 2026-04-29

### Highlights

`niteshift auth` now uses WorkOS's device authorization grant directly. Existing users will need to re-authenticate once after upgrading.

### Changed

- `niteshift auth` now authenticates directly with WorkOS ([#177](https://github.com/niteshiftdev/niteshift-cli/pull/177))

### Fixed

- `niteshift watch` exit code now reflects CLI failures only ([#181](https://github.com/niteshiftdev/niteshift-cli/pull/181))

## [0.8.3] - 2026-04-16

### Added

- Claude Opus 4.7 is now available and is the new default model ([#175](https://github.com/niteshiftdev/niteshift-cli/pull/175))

### Changed

- Updated `@anthropic-ai/sdk` to 0.90.0 ([#175](https://github.com/niteshiftdev/niteshift-cli/pull/175))

## [0.8.2] - 2026-04-15

### Fixed

- Sessions picked up via `niteshift pickup` now appear in Claude Code's native `claude --resume` picker. Previously the snapshots were tagged with an SDK entrypoint that Claude Code hides from the picker by design ([#171](https://github.com/niteshiftdev/niteshift-cli/pull/171))

## [0.8.1] - 2026-04-09

### Added

- `niteshift run` now supports `-f, --file <path>` for attaching files to new tasks — works the same as `prompt --file` ([#167](https://github.com/niteshiftdev/niteshift-cli/pull/167))

### Changed

- Editor input now uses a scissor line (`-- >8 --`) instead of `#`-comment stripping, so markdown headers in prompts are preserved ([#167](https://github.com/niteshiftdev/niteshift-cli/pull/167))
- Task URLs now use `/repo/owner/repo/taskId` format to match the web app ([#169](https://github.com/niteshiftdev/niteshift-cli/pull/169))

## [0.8.0] - 2026-04-08

### Highlights

This release improves CLI ergonomics across commands — every interactive command now supports task pickers and `$EDITOR`-based input when arguments are omitted.

### Added

- `niteshift run` without arguments now opens `$EDITOR` to compose prompts, with comment-line stripping and graceful abort on empty input ([#162](https://github.com/niteshiftdev/niteshift-cli/pull/162))
- New `niteshift open [taskId]` command opens a task directly in the browser ([#162](https://github.com/niteshiftdev/niteshift-cli/pull/162))
- `niteshift watch` and `niteshift open` show an interactive task picker when called without a task ID ([#162](https://github.com/niteshiftdev/niteshift-cli/pull/162))
- `niteshift prompt` now supports an interactive task picker and opens `$EDITOR` for prompt composition when arguments are omitted ([#164](https://github.com/niteshiftdev/niteshift-cli/pull/164))

## [0.7.0] - 2026-04-06

### Highlights

This release adds a new `cp` command for downloading files from remote sandboxes.

### Added

- New `niteshift cp` command for downloading files from sandboxes to your local machine — supports interactive file browsing, direct downloads, and recursive directory transfers with progress display ([#160](https://github.com/niteshiftdev/niteshift-cli/pull/160))

### Removed

- Removed experimental `handoff`, `sync`, and `init` commands and all supporting infrastructure ([#146](https://github.com/niteshiftdev/niteshift-cli/pull/146))

### Fixed

- Fixed Codex deprecation warning when using `pickup` with `auto-accept` mode ([#158](https://github.com/niteshiftdev/niteshift-cli/pull/158))

## [0.6.5] - 2026-03-17

Improves terminal reliability with automatic WebSocket reconnection after sleep, wake, and transient network drops, and makes terminal WebSocket support work consistently across supported Node.js versions.

### Changed
- Add robust WebSocket reconnection handling for terminal (#153) (18ca95c)


## [0.6.4] - 2026-03-16

### Added

- `niteshift terminal attach` now accepts `-s, --session <name>` to attach to a specific named tmux session inside the sandbox, enabling multiple independent terminals per task ([#151](https://github.com/niteshiftdev/niteshift-cli/pull/151))

## [0.6.3] - 2026-03-16

### Added

- Support for all Niteshift backend models, including GPT-5.4 and Claude Sonnet 4.6 variants, across CLI commands, terminal sessions, MCP, and shell completions ([#148](https://github.com/niteshiftdev/niteshift-cli/pull/148))

### Changed

- Clarified `--branch` help text on `run` and `terminal new` to make clear it must be an existing branch in the repo ([#149](https://github.com/niteshiftdev/niteshift-cli/pull/149))
- Renamed `pickup --branch` to `pickup --checkout` to avoid confusion with `run --branch` — the two flags have different semantics ([#149](https://github.com/niteshiftdev/niteshift-cli/pull/149))

## [0.6.2] - 2026-03-12

### Fixed

- Fixed `NODE_MODULE_VERSION` mismatch error when running on Node.js v25 by updating `better-sqlite3` ([#142](https://github.com/niteshiftdev/niteshift-cli/pull/142))
- Fixed CI to actually test against all supported Node.js versions (20, 22, 23, 24, 25) ([#144](https://github.com/niteshiftdev/niteshift-cli/pull/144))

## [0.6.1] - 2026-02-25

### Fixed

- Fixed message history pagination in `watch` command ([#140](https://github.com/niteshiftdev/niteshift-cli/pull/140))

## [0.6.0] - 2026-02-21

### Highlights

This release adds real-time streaming and interactive prompting for tasks directly from the terminal.

### Added

- New `niteshift watch <taskId>` command streams live task output to the terminal, with options for full history replay (`--all`), last N messages (`--last`), and NDJSON output (`--json`) ([#134](https://github.com/niteshiftdev/niteshift-cli/pull/134))
- New `niteshift prompt <taskId> [prompt]` command sends follow-up prompts to running tasks, with file attachment support (`-f`) and optional streaming (`--watch`) ([#134](https://github.com/niteshiftdev/niteshift-cli/pull/134))
- `niteshift run` now supports `--watch` flag to stream the response immediately after task creation ([#134](https://github.com/niteshiftdev/niteshift-cli/pull/134))

## [0.5.1] - 2026-02-12

### Changed

- Updated model list: added `claude-opus-4-6` and `gpt-5.3-codex` models, removed deprecated `gpt-5.1-codex` models ([#132](https://github.com/niteshiftdev/niteshift-cli/pull/132))

## [0.5.0] - 2026-02-02

### Added

- `niteshift terminal` command for attaching to terminals running in Niteshift tasks

## [0.4.1] - 2026-01-19

### Changed

- `pickup` now detects when a task is actively processing and waits with real-time polling instead of immediately taking over; also adds a confirmation prompt when creating a branch from main for merged tasks ([#122](https://github.com/niteshiftdev/niteshift-cli/pull/122))
- Codex agent now acknowledges context change on `pickup` instead of immediately taking action ([#123](https://github.com/niteshiftdev/niteshift-cli/pull/123))

## [0.4.0] - 2026-01-16

### Highlights

This release improves the `pickup` command with agent permission modes, one-time token authentication for "Continue Locally" from the web UI, and seamless on-demand repository linking.

### Added

- Agent mode selection when resuming sessions via `pickup`: choose between default permissions, auto-accept edits, or full auto mode with optional persistence ([#116](https://github.com/niteshiftdev/niteshift-cli/pull/116))
- One-time `--token` flag for `pickup` enables "Continue Locally" from the web UI without requiring CLI authentication ([#112](https://github.com/niteshiftdev/niteshift-cli/pull/112))
- Seamless on-demand repository linking during `pickup` flow without requiring full sync setup or confirmation prompts ([#107](https://github.com/niteshiftdev/niteshift-cli/pull/107), [#120](https://github.com/niteshiftdev/niteshift-cli/pull/120))
- Pickup context prompt injection when resuming sessions locally, informing the agent about the changed environment ([#114](https://github.com/niteshiftdev/niteshift-cli/pull/114))
- `--base-from-starting-branch` flag for `run` command to use the task's starting branch as PR base ([#111](https://github.com/niteshiftdev/niteshift-cli/pull/111))
- Claude Code release skill for guided release workflow ([#119](https://github.com/niteshiftdev/niteshift-cli/pull/119))

### Fixed

- Multiple checkouts of the same repository now correctly use the cwd-matching repo for session files ([#115](https://github.com/niteshiftdev/niteshift-cli/pull/115))
- Picking up a task from a different repository now fails immediately with a clear error message ([#118](https://github.com/niteshiftdev/niteshift-cli/pull/118))
- Run command now correctly syncs with API schema and uses optimized query for model inference ([#106](https://github.com/niteshiftdev/niteshift-cli/pull/106))

### Changed

- Experimental commands (`init`, `mcp`, `handoff`, `sync`) are now hidden from `--help` by default; use `--show-experimental` to reveal them ([#109](https://github.com/niteshiftdev/niteshift-cli/pull/109), [#110](https://github.com/niteshiftdev/niteshift-cli/pull/110))
- Removed legacy config directory migration code; XDG-compliant paths are now the standard ([#108](https://github.com/niteshiftdev/niteshift-cli/pull/108))


## [0.3.1] - 2025-10-15

### Fixed
- fix: use full path to npx in MCP server registration (#102) (876a806)


## [0.3.0] - 2025-10-13

### Highlights

This release focuses on three major improvements to make Niteshift easier to use and more powerful:

1. **Streamlined onboarding**: The new `init` command guides you through authentication, GitHub app setup, agent connection, and sync configuration in a single interactive flow.

2. **Git state syncing**: Previously, the CLI only synced your agent session. Now it also captures and restores your unpushed commits using content-addressed manifest protocol.

3. **MCP integration**: Claude Code and Codex can now invoke Niteshift directly using the MCP protocol. In Claude Code, use `/ns:handoff` to move your current session to Niteshift, or `/ns:run <prompt>` to start a new task in the cloud. For Claude Code and Codex, you can also use natural language prompts like "handoff this to niteshift" or "in niteshift check this branch for security issues".

### Added

- New `init` command provides interactive onboarding workflow for authentication, GitHub app setup, agent configuration, and sync setup ([#80](https://github.com/niteshiftdev/niteshift-cli/pull/80))
- MCP server integration allows agents to invoke CLI commands programmatically with agent auto-detection and rich task context; Claude Code users can use `/ns:handoff` and `/ns:run <prompt>` slash commands ([#66](https://github.com/niteshiftdev/niteshift-cli/pull/66), [#72](https://github.com/niteshiftdev/niteshift-cli/pull/72), [#89](https://github.com/niteshiftdev/niteshift-cli/pull/89), [#96](https://github.com/niteshiftdev/niteshift-cli/pull/96))
- `handoff` command transfers agent sessions to Niteshift with optional initial prompt to continue work ([#60](https://github.com/niteshiftdev/niteshift-cli/pull/60), [#72](https://github.com/niteshiftdev/niteshift-cli/pull/72))
- Browser callback flow during authentication eliminates manual device code copy-paste ([#79](https://github.com/niteshiftdev/niteshift-cli/pull/79))
- Git state syncing captures and restores unpushed commits using content-addressed manifest protocol ([#73](https://github.com/niteshiftdev/niteshift-cli/pull/73), [#85](https://github.com/niteshiftdev/niteshift-cli/pull/85), [#93](https://github.com/niteshiftdev/niteshift-cli/pull/93))
- `sync clear` command removes stuck pending or error tasks from the sync queue ([#82](https://github.com/niteshiftdev/niteshift-cli/pull/82))
- macOS development setup script automates installation of dependencies and local configuration ([#58](https://github.com/niteshiftdev/niteshift-cli/pull/58), [#84](https://github.com/niteshiftdev/niteshift-cli/pull/84), [#86](https://github.com/niteshiftdev/niteshift-cli/pull/86))
- Single-instance lock ensures only one sync daemon runs per environment ([#59](https://github.com/niteshiftdev/niteshift-cli/pull/59))
- `handoff` command handles uncommitted changes with interactive prompt offering three options: continue without committing, cancel, or commit with guided workflow ([#97](https://github.com/niteshiftdev/niteshift-cli/pull/97))
- `handoff` command automatically prompts to start sync daemon if not running, creating seamless workflow ([#97](https://github.com/niteshiftdev/niteshift-cli/pull/97))
- `handoff` command includes `--allow-uncommitted` flag to skip uncommitted changes check ([#97](https://github.com/niteshiftdev/niteshift-cli/pull/97))
- Confirmation prompt when first linking repository to sync explains that unpushed commits will be synced; can be skipped with `--yes` flag ([#97](https://github.com/niteshiftdev/niteshift-cli/pull/97))
- Daemon version now displayed in `sync status`, `sync start`, and `sync restart` commands ([#95](https://github.com/niteshiftdev/niteshift-cli/pull/95))
- Repository paths shown in `sync status` when multiple instances of same repository are linked, with alphabetical sorting ([#88](https://github.com/niteshiftdev/niteshift-cli/pull/88))

### Fixed

- `pickup` command now enforces repository matching to prevent attempting cross-repository branch operations ([#62](https://github.com/niteshiftdev/niteshift-cli/pull/62))
- `pickup` command no longer accidentally pops previous stash when only untracked files present ([#91](https://github.com/niteshiftdev/niteshift-cli/pull/91))
- GitHub URLs with embedded credentials (e.g., `https://x-access-token:***@github.com/`) now parse correctly ([#94](https://github.com/niteshiftdev/niteshift-cli/pull/94))
- SQLite dates now correctly treated as UTC, fixing relative date calculations ([#99](https://github.com/niteshiftdev/niteshift-cli/pull/99))
- `sync status` now shows consistent daemon PID when running via tsx/npx ([#95](https://github.com/niteshiftdev/niteshift-cli/pull/95))

### Changed

- Sync protocol now uses push-only mode with `pickup` fetching complete session snapshots instead of incremental downloads ([#83](https://github.com/niteshiftdev/niteshift-cli/pull/83))
- Refactored agent-specific code into pluggable service architecture to support multiple agents (Claude, Codex) more cleanly ([#61](https://github.com/niteshiftdev/niteshift-cli/pull/61))
- CLI reports version information with `-dev` suffix for development builds in User-Agent and custom headers ([#78](https://github.com/niteshiftdev/niteshift-cli/pull/78))
- Simplified npm package configuration by removing redundant .npmignore file ([#69](https://github.com/niteshiftdev/niteshift-cli/pull/69))
- Sync messages now show "Local commits synced: N commits" instead of technical "workdir synced: N blobs" ([#97](https://github.com/niteshiftdev/niteshift-cli/pull/97))


## [0.2.0] - 2025-09-22

### Added
- feat(config): migrate config to XDG-compliant directories (#53) (e3521c5)
- feat(sync): unify sync/link; add remove; update status and UX (#44) (7b59dba)
- feat(pickup): improve branch override handling (#49) (01e4c19)
- feat(pickup): add cwd and branch overrides to downsync operations (#50) (c1643da)
- feat(pickup): add git branch handling and --branch override for --resume flag (#39) (dbae3d2)
- feat(pickup): backfill: planner/runner and sync --backfill flag (#46) (cc1330f)
- feat(pickup): improve command UX and repository context handling (#47)
- feat(logging): unify logger, daemon sink, new LogViewer format; migrate internals (#48) (cfce9ac)
- feat(cli): task list/display tweaks, auth subcommands, sync logs; run model/branch UX; remove watch/SSE (#43) (e09cb48)
- feat(cli): rename pull->pickup, migrate binary to niteshift, and update docs (#41) (aacf108)

### Fixed
- fix(pickup): handle unsupported agent types gracefully (#54) (03b639c)
- fix(config): harden auth storage permissions (#52) (0d4ca4b)

### Changed
- Enable TypeScript strict mode for build (#40) (272a87d)


## [0.1.3] - 2025-09-18

### Added
- feat(pull): add --resume flag to open agent with pulled session (#37) (899bb45)
- feat(pull): improve output format and add support for pulling specific tasks (#33) (7d0a95a)

### Fixed
- fix(sync): handle Codex sessions correctly in pull command (#31) (a20e303)

### Changed
- Pull ignores files at zero bytes (#36) (3e8a876)
- chore: add minimumReleaseAge to pnpm workspace config (#34) (a594548)
- Improve pull: remove warning, improve task id parser (c2c2da3)
- Update CHANGELOG.md (1da3bc2)


## [0.1.2] - 2025-09-13

### Added
- feat(sync): auto-detect newly linked repositories in running daemon (#28) (3955009)
- feat(sync): add --json option to 'nite sync status' (#27) (06bff43)
- Add Codex session sync support (watcher + agentType) (#25) (10518ea)

### Fixed
- fix(sync): prevent invalid state transition crash on 500 errors (#29) (9c04feb)
- Fix sync daemon execution for npx usage (#26) (1753ad9)

### Changed
- Add Apache-2.0 license field to package.json (#24) (04afc97)


## [0.1.1] - 2025-09-08

### Changed
- Improve CLI environment handling (#22) (19da166)
- npm package fix (276c4a9)


## [0.1.0] - 2025-09-08

- Initial release of Niteshift CLI
- Task management commands (`nite run`, `nite list`)
- Repository syncing and linking (`nite sync`, `nite link`, `nite pull`)
