typebasedio 6182d89135 feat(v0.6): platform-override stderr warning on launch paths
Closes the half-feature surfaced during Phase 1 review: doctor now
shows that persistent session_mode is overridden to direct on native
Windows, but the launch-time entry paths were silently downgrading
without telling the user. This commit adds the one-line warning
specified by the user, gated to the four entry commands where the
downgrade actually has an effect.

cmd/persistent.go:

- New package-level const platformOverrideWarning carries the exact
  spec-mandated text so tests don't have to retype the copy.
- New helper emitPlatformOverrideWarningIfNeeded(alwaysPersistent).
  Loads the resolver, reads SessionMode(), and emits the warning to
  stderr when:
    1. the call site is NOT AlwaysPersistent (attach has no
       direct-mode fallback and continues to refuse on native
       Windows via preflightPersistentEntry), AND
    2. the resolver's value resolved through PlatformOverride.
  Doctor and info do not call this helper — they render source
  attribution themselves and an extra stderr line from a diagnostic
  command would be noise. "Once per invocation" is provided
  implicitly by the call site running at most once per ctask
  command; no warn-once subsystem.

cmd/entry.go:

- defaultRunWorkspaceEntry calls the helper at the top, before any
  launch work. This covers all four entry paths (new / resume / last
  / open) since they all funnel through runWorkspaceEntry. attach
  also routes here but sets AlwaysPersistent=true, so the helper
  short-circuits.

cmd/platform_warning_test.go (5 cases):

- TestPlatformOverrideWarningEmittedOnLaunch — simulated native
  Windows + config session_mode: persistent + AlwaysPersistent=false
  → warning text appears on stderr.
- TestPlatformOverrideWarningNotEmittedWhenDirect — config
  session_mode: direct → no warning even on simulated Windows.
- TestPlatformOverrideWarningNotEmittedWithoutConfig — builtin
  default (direct) → no warning.
- TestPlatformOverrideWarningNotEmittedOnNonWindows — persistent
  config but isNativeWindows() returns false → no warning.
- TestPlatformOverrideWarningSkippedForAlwaysPersistent — attach's
  AlwaysPersistent=true gate prevents emission. attach's actual
  refusal contract on native Windows is already covered by
  TestPreflightRefusesNativeWindows in persistent_test.go.

Validation: `go test ./... -count=1`, `go vet ./...`, `go build`,
and `just build-linux` all clean.
2026-05-14 22:12:28 -04:00
2026-04-06 10:05:27 -04:00
2026-04-06 10:05:27 -04:00
2026-04-06 10:05:27 -04:00
2026-04-06 10:05:27 -04:00

ctask

A local CLI that creates and manages named AI-agent task workspaces.

ctask gives developers dedicated directories with consistent structure, visible session identity, environment context injection, and automatic session logging -- so you can start, resume, and organize AI-assisted work more safely and predictably.

Status

v0.2.0 -- local use, not published to any package registry. Windows-primary, cross-platform design.

Key Features

  • Named workspaces with consistent layout (task metadata, notes, context, output, logs)
  • Session traceability -- automatic file-change snapshot logging on every session
  • Agent-agnostic -- default agent is Claude Code, but any CLI agent or shell works
  • Query resolution -- find workspaces by name, slug, or substring
  • Status line -- persistent session context inside Claude Code's UI
  • Doctor -- verify setup and diagnose configuration problems
  • Safe delete -- active workspace protection prevents accidental data loss

Install (Windows)

cd C:\Users\Warren\claude_tasks\ctask_v0.1
powershell -NoProfile -ExecutionPolicy Bypass -File scripts/install.ps1

Installs to %LOCALAPPDATA%\ctask\bin. Open a new terminal after install.

See docs/install.md for full details.

Quick Start

# Verify setup
ctask doctor

# Create a new task workspace and launch Claude Code
ctask new "fix auth bug"

# List recent workspaces
ctask list

# Resume where you left off
ctask last

# Or resume a specific workspace
ctask resume auth-bug

Commands

Command Description
ctask new [title] Create a new workspace and launch the agent
ctask list Show recent workspaces
ctask resume <query> Reopen a workspace and launch the agent
ctask open <query> Open a workspace in a shell (no agent)
ctask info <query> Display workspace metadata
ctask archive <query> Mark a workspace as archived
ctask last Resume the most recently updated workspace
ctask doctor Verify ctask setup
ctask delete <query> Permanently remove a workspace

See docs/commands.md for full usage.

Status Line

ctask includes a status-line helper for Claude Code that shows session context at the bottom of the UI:

(ctask:fix-auth-bug|local) C:\Users\Warren\ai-workspaces\general\2026-04-06_fix-auth-bug

Run ctask doctor to check if the status line is configured. See docs/install.md for setup.

Uninstall

cd C:\Users\Warren\claude_tasks\ctask_v0.1
powershell -NoProfile -ExecutionPolicy Bypass -File scripts/uninstall.ps1

Removes ctask files only. Your workspaces and task data are never touched.

Troubleshooting

See docs/troubleshooting.md.

S
Description
No description provided
Readme 544 KiB
v0.6.1 Latest
2026-05-21 11:02:21 +00:00
Languages
Go 96.6%
Shell 1.7%
PowerShell 1.5%
Just 0.2%