Skip to content

Fix Claude directory links and missing history - #764

Merged
SaladDay merged 1 commit into
mainfrom
fix-claude-directory-links-and-missing-history
Oct 19, 2026
Merged

SaladDay merged 1 commit into
mainfrom
fix-claude-directory-links-and-missing-history

Conversation

@SaladDay

@SaladDay SaladDay commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This fixes two Claude Code workspace behaviors that made the live acceptance test fail on main. With both fixed, the test passes.

  • Directory listing follows no links. The bridge listed through symbolic links, including a link that points outside the workspace. It now checks each path component with lstat and rejects a link the same way it rejects a regular file, as the list files contract says: links are never followed, and on the Claude path a regular file or symbolic link returns 503. The bridge's unit test asserted the old behavior and now asserts the rejection.
  • Missing native history is reported as history_unavailable. On an Executor, the bridge emitted the history error through the Turn-scoped emitter before any Turn was bound. That emitter threw, so preparation failed with execution_failed. The error now goes through the owner emitter, which the Go Executor already maps to history_unavailable.
  • The live test waits for the native process to exit before changing the state directory. The previous Turn's native process writes its last transcript entries while its Executor closes, after Done. Production already waits: the dispatcher rejects a new Executor for a Session while the old one is still closing.

Checks

  • pnpm test in packages/claude-sdk-adapter: 180 passed. The new Executor test fails without the fix, and so does the updated listing test.
  • go vet and go test for apps/daemon/internal/agent/claudesdk; make check-docs.
  • Live: TestLiveClaudeWorkspaceFactory passes in full with MiniMax-M3 through MiniMax's Anthropic endpoint, Claude Code 2.1.269 and Node 22.22.2, with no test edits. That covers native commands, cancellation, fresh-process continuation, directory listing denials and missing history.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@SaladDay
SaladDay merged commit ab77c10 into main Oct 19, 2026
21 checks passed
@SaladDay
SaladDay deleted the fix-claude-directory-links-and-missing-history branch October 19, 2026 03:51
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