Skip to content

th-adc3d4: th code workspaces, persistent logs, queue/steer, task panel - #758

Merged
brentrager merged 3 commits into
mainfrom
th-adc3d4-th-code-workspaces-logs
Oct 5, 2026
Merged

brentrager merged 3 commits into
mainfrom
th-adc3d4-th-code-workspaces-logs

Conversation

@brentrager

Copy link
Copy Markdown
Contributor

Problem

th code didn't behave like Claude Code/Codex in the user's environment: cross-repo reads hit workspace-boundary errors with no explanation, the shell tool lost the user's PATH (mise/Homebrew toolchains), tool failures weren't persisted anywhere useful, the TUI task checklist overlaid the input, and user vs agent output was hard to tell apart.

Solution

  • Workspaces: th code registers its launch directory; /workspace add <path> opens another repo for just that conversation via a token-protected POST /api/session/workspaces. SMOOTH_WORKSPACES adds daemon-wide roots. Root containment compares canonical paths (macOS /var vs /private/var).
  • Shell: BashTool inherits the launching client's PATH (16 KiB cap) plus system interpreter and Homebrew/mise paths.
  • Sandbox clarity: /environment explains the actual sandbox posture; daemon tool logs record sandbox= scope.
  • Logs: sanitized tool/turn failures persist to ~/.smooth/logs/smooth-code-tool-errors.jsonl (categories only, no paths/args/results); daemon error_kind uses stable categories (outside_workspace, permission_denied, blocked_by_hook, …). /status lists th.log, the daemon log, and the JSONL.
  • UX: TUI queued messages (with images) + steer, a dedicated task region below the composer, transcript divider; web UI TodoPanel below composer.

Verification

  • smooth-code: 361/361 tests
  • smooth-tools lib: 339 passed, 2 ignored
  • smooth-daemon: tool-log hook (7) and workspace route (6) tests
  • web: typecheck, 83 tests, production build

🤖 Generated with Claude Code

@changeset-bot

changeset-bot Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0b18971

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@smooai/smooth Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@brentrager
brentrager force-pushed the th-adc3d4-th-code-workspaces-logs branch from a2c4c1b to 14a4343 Compare October 5, 2026 16:58
@brentrager
brentrager enabled auto-merge (squash) October 5, 2026 16:58
@brentrager
brentrager force-pushed the th-adc3d4-th-code-workspaces-logs branch from 14a4343 to d0c3486 Compare October 5, 2026 17:20
brentrager and others added 3 commits October 5, 2026 14:25
…k panel

Make th code behave like Claude Code/Codex in the launch repo: register the
launch directory and allow explicitly adding other repos per session via a
token-protected /api/session/workspaces route and SMOOTH_WORKSPACES. Inherit
the caller's PATH in the shell tool, explain the sandbox posture in
/environment and logs, persist sanitized tool/turn failures to JSONL and show
log paths in /status, and separate the transcript, composer, queued messages
and task checklist in the TUI and web UI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ATH order

The shell tool prepended Homebrew and system dirs ahead of the caller's PATH,
so a mise-pinned toolchain lost to Homebrew's copy. The caller's PATH now comes
first, with fallbacks appended and deduplicated. PATH-string tests are
unix-only because they use `:` separators.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On Windows the ancestor walk reached the drive root, which canonicalizes to a
verbatim path that never matches a non-canonical base, so every path under a
nonexistent root was rejected. A root that isn't on disk has nothing a symlink
could hide in, so the lexical check is sufficient there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@brentrager
brentrager force-pushed the th-adc3d4-th-code-workspaces-logs branch from d0c3486 to 0b18971 Compare October 5, 2026 18:25
@brentrager
brentrager merged commit 1c03d20 into main Oct 5, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant