Adds source-attribution rendering to `ctask info` for the two Phase 1
settings whose effective value depends on user-level defaults: the
agent recorded in task.yaml and the configured launch session mode.
cmd/info.go:
- runInfo loads the resolver once (config.LoadResolver) and reuses
it across the rendering — matches the user's correction that "new
doctor/info code should load the resolver once and reuse it".
- Agent line now reads `Agent: <value> (workspace)` when task.yaml
has a non-empty agent (the common case), or `Agent: <value>
(default)` / `Agent: <value> (default — <source label>)` when the
field is empty and the value comes from the resolver fallback
chain. The fallback path is informational only: every workspace
created by recent ctask versions writes the resolved default into
task.yaml at Create time, so the (workspace) branch is what users
normally see.
- New "Launch session mode:" line lives immediately after Agent and
before Created — outside the v0.5.4 Session block per the user's
placement decision ("Keep it outside the Session block because it
represents the configured launch default, not the current session
lease mode"). Format: `Launch session mode: <value> (<source>)`.
- Two small helpers added: agentLineWithSource composes the agent
payload + label; infoSourceLabel renders a single-row source
string (CTASK_X env var / config file / built-in default /
platform override). infoSourceLabel intentionally omits the
override-chain suffix used by doctor — info's row layout has no
room for the extra parenthetical.
cmd/info_attribution_test.go (5 cases):
- TestInfoAgentSourceWorkspace — task.yaml with agent set → "(workspace)"
- TestInfoAgentSourceDefaultForLegacy — empty agent → "(default)"
- TestInfoLaunchSessionModeFromConfig — config session_mode value +
"config file" source label
- TestInfoLaunchSessionModeBuiltinDefault — no config, no env →
"direct (built-in default)"
- TestInfoLaunchSessionModeAfterAgentBeforeCreated — placement check:
Agent < Launch session mode < Created in the rendered output
Smoke-verified against an existing v0.5.x workspace on the installed
binary; render order and source labels match the spec example.
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.